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

False positive when using re-assigned query variable #14

@js-everts

Description

@js-everts
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions