Skip to content

Proposal: gimme module to get the Go version defined in go.mod #199

Open
@brackendawson

Description

Since the go directive in a module's go.mod file is a statement of the minimum Go version required to compile the packages in the module, it would be prudent to test that version of Go to ensure that nobody unknowingly introduces a language feature from a newer Go version.

Right now to do this you must list that Go version in your .travis.yml and keep it in sync with the version in your go.mod, which I think is error-prone.

I think it would be useful if there was a new alias to refer to the go directive in the go.mod file, such as:

go:
- stable
- module

It would choose the most recent patch release from that Go version.

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