Skip to content

Conversation

@github-actions
Copy link

@github-actions github-actions bot commented Oct 14, 2025

This PR updates Go to the latest stable release.

  • go directive: 1.25.0
  • toolchain: 1.25.3

Other changes:

  • All docs pointing to Go version are updated.
  • Devcontainer dependency on Go is updated and tested in Codespaces.
  • An old backport of strings.CutSuffix is now dropped in favour of stdlib implementation.

The reported vulnerabilities (e.g. here) are false positives. It's because govluncheck thinks we're importing the latest untagged cli/cli as an external dependency.

@github-actions github-actions bot requested a review from a team as a code owner October 14, 2025 03:20
@github-actions github-actions bot requested a review from babakks October 14, 2025 03:20
This was referenced Oct 17, 2025
@babakks babakks self-assigned this Oct 31, 2025
Signed-off-by: Babak K. Shandiz <[email protected]>
The `cutSuffix` function was added to backport the functionality of
`strings.CutSuffix` from Go 1.20. Now that we're using Go 1.25, we can
safely replace our backport with the standard library function. Our
backport was an intact copy/paste of the stdlib implementation, so this
change does not alter any behavior.

Signed-off-by: Babak K. Shandiz <[email protected]>
Signed-off-by: Babak K. Shandiz <[email protected]>
@babakks babakks requested review from BagToad and Copilot and removed request for babakks October 31, 2025 12:28
Comment on lines -100 to -106
// Backport strings.CutSuffix from Go 1.20.
func cutSuffix(s, suffix string) (string, bool) {
if !strings.HasSuffix(s, suffix) {
return s, false
}
return s[:len(s)-len(suffix)], true
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was an intact copy/paste of the stdlib implementation (below), so it's safe to just use the stdlib now:

func CutSuffix(s, suffix string) (before string, found bool) {
	if !HasSuffix(s, suffix) {
		return s, false
	}
	return s[:len(s)-len(suffix)], true
}

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR upgrades the project's Go version requirement from 1.24 to 1.25 and removes a custom cutSuffix backport function in favor of using the standard library's strings.CutSuffix.

  • Upgrades Go version from 1.24 to 1.25 in go.mod
  • Replaces custom cutSuffix function with strings.CutSuffix from the standard library
  • Updates documentation and development environment configurations to reflect the new Go version requirement

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
internal/ghinstance/host.go Removes custom cutSuffix backport function and uses strings.CutSuffix
go.mod Updates Go version to 1.25.0 and toolchain to go1.25.3
docs/source.md Updates documentation to require Go 1.25+
docs/install_source.md Updates installation instructions to require Go 1.25+
.github/CONTRIBUTING.md Updates contributor prerequisites to require Go 1.25+
.devcontainer/devcontainer.json Updates dev container image to use Go 1.25

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@BagToad BagToad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, I think there are issues with this branch. Govulncheck is failing 🤔

@babakks
Copy link
Member

babakks commented Oct 31, 2025

Yeah, I've noticed them. Already touched on this in the body:

The reported vulnerabilities (e.g. here) are false positives. It's because govluncheck thinks we're importing the latest untagged cli/cli as an external dependency.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants