File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
pkg/golinters/noctx/testdata Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -167,7 +167,7 @@ func _() {
167167
168168 // transactions
169169
170- tx , _ := db .Begin ()
170+ tx , _ := db .Begin () // want `\(\*database/sql\.DB\)\.Begin must not be called. use \(\*database/sql\.DB\)\.BeginTx`
171171 tx .Exec ("select * from testdata" ) // want `\(\*database/sql\.Tx\)\.Exec must not be called. use \(\*database/sql\.Tx\)\.ExecContext`
172172 tx .ExecContext (ctx , "select * from testdata" )
173173
Original file line number Diff line number Diff line change @@ -184,7 +184,7 @@ func _() {
184184
185185 // transactions
186186
187- tx , _ := db .Begin ()
187+ tx , _ := db .Begin () // want `\(\*database/sql\.DB\)\.Begin must not be called. use \(\*database/sql\.DB\)\.BeginTx`
188188 tx .Exec ("select * from testdata" ) // want `\(\*database/sql\.Tx\)\.Exec must not be called. use \(\*database/sql\.Tx\)\.ExecContext`
189189 tx .ExecContext (ctx , "select * from testdata" )
190190
You can’t perform that action at this time.
0 commit comments