description:'The Go version to download (if necessary) and use. Supports semver spec and ranges. Be sure to enclose this option in single quotation marks.'
description:'The Go version to download (if necessary) and use. Supports semver spec and ranges. Be sure to enclose this option in single quotation marks.'
go-version-file:
go-version-file:
description:'Path to the go.mod, go.work, .go-version, or .tool-versions file.'
description:'Path to the go.mod, go.work, .go-version, or .tool-versions file. If not specified, the action will automatically use go.mod from the workspace root if it exists.'
check-latest:
check-latest:
description:'Set this option to true if you want the action to always check for the latest available version that satisfies the version spec'
description:'Set this option to true if you want the action to always check for the latest available version that satisfies the version spec'
If both the `go-version` and the `go-version-file` inputs are provided then the `go-version` input is used. The `.tool-versions` file supports version specifications in accordance with asdf standards, adhering to Semantic Versioning ([semver](https://semver.org)).
If both the `go-version` and the `go-version-file` inputs are provided then the `go-version` input is used. The `.tool-versions` file supports version specifications in accordance with asdf standards, adhering to Semantic Versioning ([semver](https://semver.org)).
### Automatic go.mod detection
If neither `go-version` nor `go-version-file` is specified, the action will automatically look for a `go.mod` file in the repository root and use the Go version specified in it. This simplifies workflows for projects that already have a `go.mod` file.