Skip to content

QF1012: support implicit pointers #1097

@dominikh

Description

@dominikh

QF1012 flags

b := new(bytes.Buffer)
b.WriteString(fmt.Sprint(...))

but it doesn't flag

var b bytes.Buffer
b.WriteString(fmt.Sprint(...))

because in the second example, b does not implement io.StringWriter, and fmt.Sprintf(b, ...) would not compile. We should detect this and use &b.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions