Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

False positive when using re-assigned query variable #14

Open
js-everts opened this issue May 12, 2022 · 0 comments
Open

False positive when using re-assigned query variable #14

js-everts opened this issue May 12, 2022 · 0 comments

Comments

@js-everts
Copy link

js-everts commented May 12, 2022

f6 := `UPDATE * FROM test WHERE test=?`
_, _ = db.Exec(f6, s)

// re-assign variable f6
f6 = `SELECT * FROM test WHERE test=?`
_ = db.QueryRow(f6, s)

The above snippet produces the following error on the last line:

Use Exec instead of QueryRow to execute `UPDATE` query

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant