setup-go icon indicating copy to clipboard operation
setup-go copied to clipboard

feat: use go.mod when no version inputs specified

Open raeperd opened this issue 6 months ago • 0 comments

Description:

This PR adds automatic go.mod detection when neither go-version nor go-version-file is specified. This simplifies workflows for Go projects that already have a go.mod file.

Before:

steps:
  - uses: actions/checkout@v5
  - uses: actions/setup-go@v6
    with:
      go-version-file: go.mod
  - run: go version

After:

steps:
  - uses: actions/checkout@v5
  - uses: actions/setup-go@v6
    # Automatically detects and uses go.mod from repository root
  - run: go version

Related issue: Closes #523

Check list:

  • [x] Mark if documentation changes are required.
  • [x] Mark if tests were added or updated to cover the changes.

raeperd avatar Oct 12 '25 08:10 raeperd