Skip to content

cmd/vet: check for useless assignments to struct fields #8402

Description

@josharian
Implement this TODO from the assignment checker:

// TODO: should also check for assignments to struct fields inside methods
// that are on T instead of *T. 

Discussion at https://groups.google.com/forum/#!topic/golang-nuts/rSTE4G75QQU/discussion.

This might also be extended to range loops -- see http://play.golang.org/p/FMsMT0dnhf,
linked from issue #8356.

Metadata

Metadata

Assignees

No one assigned

    Labels

    AnalysisIssues related to static analysis (vet, x/tools/go/analysis)

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions