Comments (3)
I make a test file for connect_option
package network
import "testing"
func TestExtractServers(t *testing.T) {
text := `(DESCRIPTION=
(ADDRESS_LIST=(LOAD_BALANCE=OFF)(FAILOVER=ON)
(ADDRESS=(PROTOCOL=tcp)(HOST=host_dguard)(PORT=1521))
(ADDRESS=(PROTOCOL=tcp)(HOST=host_active)(PORT=1521))
)
(CONNECT_DATA=(SERVICE_NAME=service)(SERVER=DEDICATED))
)`
t.Log(extractServers(text))
text = `(DESCRIPTION_LIST=(LOAD_BALANCE=off)(FAILOVER=on)
(DESCRIPTION=(CONNECT_TIMEOUT=5)
(ADDRESS=(PROTOCOL=TCP)(HOST=host_dguard)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=service)(SERVER=DEDICATED))
)
(DESCRIPTION=(CONNECT_TIMEOUT=5)
(ADDRESS=(PROTOCOL=TCP)(HOST=host_active)(PORT=1521))
(CONNECT_DATA=(SERVICE_NAME=service)(SERVER=DEDICATED))
)
)`
t.Log(extractServers(text))
}
the output
=== RUN TestExtractServers
connect_option_test.go:13: [{tcp host_dguard 1521} {tcp host_active 1521}] <nil>
connect_option_test.go:24: [{TCP host_dguard 1521} {TCP host_active 1521}] <nil>
--- PASS: TestExtractServers (0.00s)
PASS
so go-ora extract same information from both text
would you please give me a complete connection string (which produce connection refused) to test other function
from go-ora.
Related Issues (20)
- Panic on nil value insert HOT 2
- Blob/Clob/NClob fails when Scanning NULL value HOT 2
- ORA-12564: TNS connection refused HOT 4
- unregister custom type: AWRRPT_HTML_TYPE_TABLE. call RegisterType first HOT 3
- "ORA-01843: not a valid month" when inserting a time.Time value.
- v2.7.5 is failing when building for windows HOT 6
- Panic (index out of range) while performing a select query HOT 4
- How to configure SetMaxIdleConns and SetMaxOpenConns HOT 1
- Using Oracle Advanced Queuing with go-ora HOT 7
- Using packaged functions with Oracle Object Types and Oracle Object Collections as parameter HOT 13
- BLOB field value is truncated to 32KB HOT 3
- Execute and fetch caused ORA-03120: two-task conversion routine: integer overflow HOT 2
- integer divide by zero with a CLOB query
- Regarding oracle cursor.fetchmany fucntion feature in go-ora HOT 1
- Concurrent queries in goroutines fail with "ORA-12599: TNS:cryptographic checksum mismatch" if connection offers failover for 2 active nodes HOT 4
- How to scan RefCursor from RefCursor? HOT 3
- bug: `uint64` values are truncated on insert HOT 7
- runtime: cannot allocate memory HOT 1
- internal state weirdness HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-ora.