File tree Expand file tree Collapse file tree 3 files changed +20
-12
lines changed Expand file tree Collapse file tree 3 files changed +20
-12
lines changed Original file line number Diff line number Diff line change @@ -65,15 +65,21 @@ func main() {
6565 db := sql .OpenDB (connector )
6666 defer db .Close ()
6767
68- if words , err := txWithoutRetries (ctx , db ); err != nil {
69- panic (err )
70- } else {
68+ {
69+ words , err := txWithoutRetries (ctx , db )
70+ if err != nil {
71+ panic (err )
72+ }
73+
7174 fmt .Printf ("SUCCESS: %q\n " , strings .Join (words , " " ))
7275 }
7376
74- if words , err := txWithRetries (ctx , db ); err != nil {
75- panic (err )
76- } else {
77+ {
78+ words , err := txWithRetries (ctx , db )
79+ if err != nil {
80+ panic (err )
81+ }
82+
7783 fmt .Printf ("SUCCESS: %q\n " , strings .Join (words , " " ))
7884 }
7985}
Original file line number Diff line number Diff line change @@ -53,11 +53,12 @@ func main() {
5353 }
5454 defer db .Close (ctx )
5555
56- if words , err := txWithRetries (ctx , db ); err != nil {
56+ words , err := txWithRetries (ctx , db )
57+ if err != nil {
5758 panic (err )
58- } else {
59- fmt .Printf ("SUCCESS: %q\n " , strings .Join (words , " " ))
6059 }
60+
61+ fmt .Printf ("SUCCESS: %q\n " , strings .Join (words , " " ))
6162}
6263
6364func txWithRetries (ctx context.Context , db * ydb.Driver ) (words []string , _ error ) {
Original file line number Diff line number Diff line change @@ -54,11 +54,12 @@ func main() {
5454 }
5555 defer db .Close (ctx )
5656
57- if words , err := txWithRetries (ctx , db ); err != nil {
57+ words , err := txWithRetries (ctx , db )
58+ if err != nil {
5859 panic (err )
59- } else {
60- fmt .Printf ("SUCCESS: %q\n " , strings .Join (words , " " ))
6160 }
61+
62+ fmt .Printf ("SUCCESS: %q\n " , strings .Join (words , " " ))
6263}
6364
6465func txWithRetries (ctx context.Context , db * ydb.Driver ) (words []string , _ error ) {
You can’t perform that action at this time.
0 commit comments