Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make go-version-file: go.mod the default #523

Open
andig opened this issue Dec 21, 2024 · 3 comments
Open

Make go-version-file: go.mod the default #523

andig opened this issue Dec 21, 2024 · 3 comments
Labels
feature request New feature or request to improve the current logic

Comments

@andig
Copy link

andig commented Dec 21, 2024

Description:
Currently, I have to add

with:
  go-version-file: go.mod

for all builds to specify a go version. Instead, the "default" go version that any go program would use is the one from the go.mod with fallback to the installed go version. This should be the default for setup-go, too.

Justification:
Simplify developer's life.

Are you willing to submit a PR?

@andig andig added feature request New feature or request to improve the current logic needs triage labels Dec 21, 2024
@mahalakshmi-rekadi
Copy link

Hi, @andig 👋 Thank you for the feature request, we will investigate it and get back to you as soon as we have some feedback.

@Jacalz
Copy link

Jacalz commented Jan 21, 2025

This seems like a helpful change. If not Go version is specified we load the one from the module and anyone that wants to test oldest supported and newest, we can do something like #450.

@andig
Copy link
Author

andig commented Jan 21, 2025

Thinking about it I'm no longer too happy with this request. If go.mod specifies the minimum version- and the go command will upgrade to that toolchain if not already installed- then the version for compiling should be the current stable version. It is just not entirely clear to me, what the default version of setup-go even is if no version is specified?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request to improve the current logic
Projects
None yet
Development

No branches or pull requests

3 participants