Skip to content

Commit 184d952

Browse files
committed
fixed connection strings in examples
1 parent 1b74f04 commit 184d952

File tree

7 files changed

+15
-15
lines changed

7 files changed

+15
-15
lines changed

coordination/example_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
// nolint: errcheck
1212
func Example() {
1313
ctx := context.TODO()
14-
db, err := ydb.Open(ctx, "grpcs://localhost:2135/?database=/local")
14+
db, err := ydb.Open(ctx, "grpcs://localhost:2135/local")
1515
if err != nil {
1616
fmt.Printf("failed to connect: %v", err)
1717
return

discovery/example_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
func Example_discoverCluster() {
1111
ctx := context.TODO()
12-
db, err := ydb.Open(ctx, "grpcs://localhost:2135/?database=/local")
12+
db, err := ydb.Open(ctx, "grpcs://localhost:2135/local")
1313
if err != nil {
1414
fmt.Printf("failed to connect: %v", err)
1515
return
@@ -28,7 +28,7 @@ func Example_discoverCluster() {
2828

2929
func Example_whoAmI() {
3030
ctx := context.TODO()
31-
db, err := ydb.Open(ctx, "grpcs://localhost:2135/?database=/local")
31+
db, err := ydb.Open(ctx, "grpcs://localhost:2135/local")
3232
if err != nil {
3333
fmt.Printf("failed to connect: %v", err)
3434
return

example_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313

1414
func Example_table() {
1515
ctx := context.TODO()
16-
db, err := ydb.Open(ctx, "grpcs://localhost:2135/?database=/local")
16+
db, err := ydb.Open(ctx, "grpcs://localhost:2135/local")
1717
if err != nil {
1818
log.Fatal(err)
1919
}
@@ -54,7 +54,7 @@ func Example_table() {
5454

5555
func Example_scripting() {
5656
ctx := context.TODO()
57-
db, err := ydb.Open(ctx, "grpcs://localhost:2135/?database=/local")
57+
db, err := ydb.Open(ctx, "grpcs://localhost:2135/local")
5858
if err != nil {
5959
fmt.Printf("failed to connect: %v", err)
6060
return
@@ -97,7 +97,7 @@ func Example_scripting() {
9797

9898
func Example_discovery() {
9999
ctx := context.TODO()
100-
db, err := ydb.Open(ctx, "grpcs://localhost:2135/?database=/local")
100+
db, err := ydb.Open(ctx, "grpcs://localhost:2135/local")
101101
if err != nil {
102102
fmt.Printf("failed to connect: %v", err)
103103
return

ratelimiter/example_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111

1212
func Example() {
1313
ctx := context.TODO()
14-
db, err := ydb.Open(ctx, "grpcs://localhost:2135/?database=/local")
14+
db, err := ydb.Open(ctx, "grpcs://localhost:2135/local")
1515
if err != nil {
1616
fmt.Printf("failed to connect: %v", err)
1717
return

scheme/example_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
func Example() {
1111
ctx := context.TODO()
12-
db, err := ydb.Open(ctx, "grpcs://localhost:2135/?database=/local")
12+
db, err := ydb.Open(ctx, "grpcs://localhost:2135/local")
1313
if err != nil {
1414
fmt.Printf("failed to connect: %v", err)
1515
return

scripting/example_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212

1313
func Example_execute() {
1414
ctx := context.TODO()
15-
db, err := ydb.Open(ctx, "grpcs://localhost:2135/?database=/local")
15+
db, err := ydb.Open(ctx, "grpcs://localhost:2135/local")
1616
if err != nil {
1717
fmt.Printf("failed to connect: %v", err)
1818
return
@@ -55,7 +55,7 @@ func Example_execute() {
5555

5656
func Example_streamExecute() {
5757
ctx := context.TODO()
58-
db, err := ydb.Open(ctx, "grpcs://localhost:2135/?database=/local")
58+
db, err := ydb.Open(ctx, "grpcs://localhost:2135/local")
5959
if err != nil {
6060
fmt.Printf("failed to connect: %v", err)
6161
return
@@ -99,7 +99,7 @@ func Example_streamExecute() {
9999

100100
func Example_explainPlan() {
101101
ctx := context.TODO()
102-
db, err := ydb.Open(ctx, "grpcs://localhost:2135/?database=/local")
102+
db, err := ydb.Open(ctx, "grpcs://localhost:2135/local")
103103
if err != nil {
104104
fmt.Printf("failed to connect: %v", err)
105105
return
@@ -123,7 +123,7 @@ func Example_explainPlan() {
123123

124124
func Example_explainValidate() {
125125
ctx := context.TODO()
126-
db, err := ydb.Open(ctx, "grpcs://localhost:2135/?database=/local")
126+
db, err := ydb.Open(ctx, "grpcs://localhost:2135/local")
127127
if err != nil {
128128
fmt.Printf("failed to connect: %v", err)
129129
return

table/example_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import (
1515

1616
func Example_select() {
1717
ctx := context.TODO()
18-
db, err := ydb.Open(ctx, "grpcs://localhost:2135/?database=/local")
18+
db, err := ydb.Open(ctx, "grpcs://localhost:2135/local")
1919
if err != nil {
2020
fmt.Printf("failed connect: %v", err)
2121
return
@@ -57,7 +57,7 @@ func Example_select() {
5757

5858
func Example_createTable() {
5959
ctx := context.TODO()
60-
db, err := ydb.Open(ctx, "grpcs://localhost:2135/?database=/local")
60+
db, err := ydb.Open(ctx, "grpcs://localhost:2135/local")
6161
if err != nil {
6262
fmt.Printf("failed connect: %v", err)
6363
return
@@ -83,7 +83,7 @@ func Example_createTable() {
8383

8484
func Example_bulkUpsert() {
8585
ctx := context.TODO()
86-
db, err := ydb.Open(ctx, "grpcs://localhost:2135/?database=/local")
86+
db, err := ydb.Open(ctx, "grpcs://localhost:2135/local")
8787
if err != nil {
8888
fmt.Printf("failed connect: %v", err)
8989
return

0 commit comments

Comments
 (0)