Skip to content

"+build" line is not needed since Go 1.17 #1

@tymofij

Description

@tymofij

Go modernize tool warns that the files generated by wire contain line // +build !wireinject which is not needed since Go 1.17

go run golang.org/x/tools/go/analysis/passes/modernize/cmd/modernize@latest ./...

It'd be great if wire could check Go version stated in go.mod and if it's greater or equal than 1.17 then don't emit // +build !wireinject

Or may be drop it always, if compatibility with Go 1.16 is not a goal.

https://go.dev/doc/go1.17#build-lines

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions