actions / actions/setup-go

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

Open
#523 9 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
TypeScript
Stars
1.8k
Forks
673
Avg merge
6d 28m
Merged PRs (30d)
4

Description

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?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting setup-go's handling of the go-version-file input and the existing version-resolution tests. Verify how a go.mod version could become the default while preserving the installed Go version as fallback. Done means workflows without an explicit input use go.mod when present and otherwise retain the current fallback behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, typescript
Domain
ci-cd, devops
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.