1+ //nolint:goconst
12package topic_test
23
34import (
@@ -20,7 +21,7 @@ func Example_createTopic() {
2021 }
2122 db , err := ydb .Open (ctx , connectionString )
2223 if err != nil {
23- log .Fatalf ("failed connect: %v" , err )
24+ log .Printf ("failed connect: %v" , err )
2425 return
2526 }
2627 defer db .Close (ctx ) // cleanup resources
@@ -34,7 +35,7 @@ func Example_createTopic() {
3435 topicoptions .CreateWithMinActivePartitions (3 ),
3536 )
3637 if err != nil {
37- log .Fatalf ("failed create topic: %v" , err )
38+ log .Printf ("failed create topic: %v" , err )
3839 return
3940 }
4041}
@@ -47,7 +48,7 @@ func Example_alterTopic() {
4748 }
4849 db , err := ydb .Open (ctx , connectionString )
4950 if err != nil {
50- log .Fatalf ("failed connect: %v" , err )
51+ log .Printf ("failed connect: %v" , err )
5152 return
5253 }
5354 defer db .Close (ctx ) // cleanup resources
@@ -59,7 +60,7 @@ func Example_alterTopic() {
5960 }),
6061 )
6162 if err != nil {
62- log .Fatalf ("failed alter topic: %v" , err )
63+ log .Printf ("failed alter topic: %v" , err )
6364 return
6465 }
6566}
@@ -72,14 +73,14 @@ func Example_describeTopic() {
7273 }
7374 db , err := ydb .Open (ctx , connectionString )
7475 if err != nil {
75- log .Fatalf ("failed connect: %v" , err )
76+ log .Printf ("failed connect: %v" , err )
7677 return
7778 }
7879 defer db .Close (ctx ) // cleanup resources
7980
8081 descResult , err := db .Topic ().Describe (ctx , "topic-path" )
8182 if err != nil {
82- log .Fatalf ("failed drop topic: %v" , err )
83+ log .Printf ("failed drop topic: %v" , err )
8384 return
8485 }
8586 fmt .Printf ("describe: %#v\n " , descResult )
@@ -93,14 +94,14 @@ func Example_dropTopic() {
9394 }
9495 db , err := ydb .Open (ctx , connectionString )
9596 if err != nil {
96- log .Fatalf ("failed connect: %v" , err )
97+ log .Printf ("failed connect: %v" , err )
9798 return
9899 }
99100 defer db .Close (ctx ) // cleanup resources
100101
101102 err = db .Topic ().Drop (ctx , "topic-path" )
102103 if err != nil {
103- log .Fatalf ("failed drop topic: %v" , err )
104+ log .Printf ("failed drop topic: %v" , err )
104105 return
105106 }
106107}
@@ -113,7 +114,7 @@ func Example_readMessage() {
113114 }
114115 db , err := ydb .Open (ctx , connectionString )
115116 if err != nil {
116- log .Fatalf ("failed connect: %v" , err )
117+ log .Printf ("failed connect: %v" , err )
117118 return
118119 }
119120 defer db .Close (ctx ) // cleanup resources
0 commit comments