We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92247d1 commit a9eaf3fCopy full SHA for a9eaf3f
cmd/connection-pool-sample/main.go
@@ -32,7 +32,12 @@ func main() {
32
if err != nil {
33
log.Fatalf("Error starting transaction: %v", err)
34
}
35
- defer tx.Rollback(context.Background())
+ defer func() {
36
+ err := tx.Rollback(context.Background())
37
+ if err != nil {
38
+ log.Fatal(err)
39
+ }
40
+ }()
41
42
_, err = tx.Exec(context.Background(), `
43
INSERT INTO authors (name, email)
0 commit comments