Retrieve go version from go.mod file
See original GitHub issueDescription:
Instead of hard-coding the go
version, the action could (optionally)
- search in the root of the project (or in any other configurable place) for a
go.mod
file - extract and use the
go
version specified there.
Justification: Justification or a use case for your proposal.
Are you willing to submit a PR?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:23
- Comments:7 (1 by maintainers)
Top Results From Across the Web
go.mod file reference - The Go Programming Language
Specifies a module or module version to exclude from the current module's dependency graph. For more, see exclude directive in the Go Modules...
Read more >How to upgrade the go version in a go mod - Stack Overflow
How to upgrade the go version in a go mod · 7. Edit the file by hand or use go mod edit -go=1.14...
Read more >How to Use Go Modules | DigitalOcean
The next step is to create a go.mod file within the mymodule directory to ... Using go get to add the latest version...
Read more >Go Modules Cheat Sheet - Encore.dev
Find all dependencies the main module needs (recursively, using the dependencies' go.mod files); For each dependency, use the greatest version that any go.mod ......
Read more >How To Upgrade To A Major Version In Go - Golang Cafe
go get github.com/awesomerepo/pkg@v2.0.0 invalid version: module contains a go.mod file, so major version must be compatible: should be v0 or v1, not v2....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FWIW, this is the workaround I use:
Hello, @pantelis-karamolegkos 👋 Thank you and all others for contributing! We are closing this issue because this PR has been successfully merged. If you have any questions or additions feel free to ping us.
Cheers!