Skip to content

Commit 4a82118

Browse files
committed
fixed linter issues
1 parent 860aa89 commit 4a82118

File tree

3 files changed

+20
-12
lines changed

3 files changed

+20
-12
lines changed

examples/transaction/database/sql/main.go

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff 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
}

examples/transaction/query/main.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff 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

6364
func txWithRetries(ctx context.Context, db *ydb.Driver) (words []string, _ error) {

examples/transaction/table/main.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff 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

6465
func txWithRetries(ctx context.Context, db *ydb.Driver) (words []string, _ error) {

0 commit comments

Comments
 (0)