-
Notifications
You must be signed in to change notification settings - Fork 16
chore: set Go 1.25 as minimum for v3 #156
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
Conversation
WalkthroughThe required Go version was incremented from 1.24 to 1.25 in documentation, migration configuration, and associated tests. No APIs or exported symbols changed. Test expectations and migration lists were updated to reflect the new Go version target. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~7 minutes Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary of Changes
Hello @ReneWerner87, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request updates the minimum required Go version for the gofiber/cli project to Go 1.25. This change ensures that the project leverages the latest language features and improvements, aligning the development environment with current Go standards. It involves updating core configuration files and related scripts to reflect this new version requirement.
Highlights
- Go Version Update: The project's minimum Go version requirement has been upgraded from Go 1.24 to Go 1.25.
- Documentation Alignment: The README.md file has been updated to reflect the new Go 1.25 requirement.
- Build Configuration: The go.mod file now specifies Go 1.25 as the module's Go version.
- Migration Script Updates: Internal migration scripts and their corresponding tests have been adjusted to use and verify Go 1.25.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request correctly updates the minimum required Go version to 1.25. The changes are consistently applied across the README, go.mod, and migration scripts. The test for the migration has also been updated. I have one suggestion to improve the robustness of the test assertion.
| content := readFile(t, filepath.Join(dir, "go.mod")) | ||
| assert.Contains(t, content, "go 1.23") | ||
| assert.Contains(t, buf.String(), "1.23") | ||
| assert.Contains(t, content, "go 1.25") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While this assertion is correct, it could be more robust. assert.Contains only checks for the presence of the substring go 1.25 and would not fail if the old version string (go 1.21 from the test setup) was also present for some reason.
To make the test stronger, you could also assert that the old version is no longer present:
assert.Contains(t, content, "go 1.25")
assert.NotContains(t, content, "go 1.21")For an even more robust check that is resilient to formatting changes, you could parse the go.mod file and verify the version directly. This would require adding an import for golang.org/x/mod/modfile.
b, err := os.ReadFile(filepath.Join(dir, "go.mod"))
require.NoError(t, err)
mf, err := modfile.Parse("go.mod", b, nil)
require.NoError(t, err)
assert.Equal(t, "1.25", mf.Go.Version)There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
cmd/internal/migrations/go_version_test.go (1)
53-54: Tighten assertions to avoid accidental partial matches.Use a regex that anchors the go directive line and version in the output to reduce false positives.
Apply this diff:
- assert.Contains(t, content, "go 1.25") - assert.Contains(t, buf.String(), "1.25") + assert.Regexp(t, `(?m)^\s*go 1\.25(\s|$)`, content) + assert.Regexp(t, `(?m)\b1\.25\b`, buf.String())cmd/internal/migrations/lists.go (1)
65-65: Optional: Single source of truth for minimum Go version.To avoid drift between README, migration list, and tests, consider centralizing the min Go version as a constant and using it here and in tests.
Apply this minimal change in this file:
- MigrateGoVersion("1.25"), + MigrateGoVersion(MinGoVersion),And add a new internal constant (example):
// cmd/internal/migrations/version.go package migrations // MinGoVersion is the minimum Go version required/suggested by v3 migrations. // Keep in sync with README and CI. const MinGoVersion = "1.25"Then, in tests, reference the same constant:
- fn := migrations.MigrateGoVersion("1.25") + fn := migrations.MigrateGoVersion(migrations.MinGoVersion)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (3)
.github/workflows/linter.ymlis excluded by!**/*.yml.github/workflows/test.ymlis excluded by!**/*.ymlgo.modis excluded by!**/*.mod
📒 Files selected for processing (3)
README.md(1 hunks)cmd/internal/migrations/go_version_test.go(1 hunks)cmd/internal/migrations/lists.go(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Build (1.25.x, macos-13)
- GitHub Check: Build (1.25.x, windows-latest)
🔇 Additional comments (4)
README.md (1)
9-9: All Go version references updated to 1.25—no stragglers detected• README.md (line 9) now reads “Requires Go 1.25 or later.”
• No go.mod files found in the repo.
• No Go version pins in GitHub workflows.cmd/internal/migrations/go_version_test.go (1)
49-49: Test target bumped to 1.25 — looks correct and consistent with PR goal.cmd/internal/migrations/lists.go (2)
65-65: Migration updated to set Go 1.25 — aligns with README and tests.
65-65: No Remaining References to Go 1.24All calls to
MigrateGoVersionhave been updated to"1.25", and a repo-wide search confirms there are no lingering"1.24"references.—
Summary
Testing
go test ./...https://chatgpt.com/codex/tasks/task_e_689bb0014f3883268520f4519c55a990
Summary by CodeRabbit