Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- uses: actions/setup-go@v5
with:
# NOTE: Keep this in sync with the version from go.mod
go-version: "1.24.x"
go-version: "1.25.x"
cache: false

- name: golangci-lint
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
Build:
strategy:
matrix:
go-version: [1.24.x]
go-version: [1.25.x]
platform: [ubuntu-latest, windows-latest, macos-latest, macos-13]
runs-on: ${{ matrix.platform }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Fiber Command Line Interface

## Installation

Requires Go 1.24 or later.
Requires Go 1.25 or later.

```bash
go install github.com/gofiber/cli/fiber@latest
Expand Down
6 changes: 3 additions & 3 deletions cmd/internal/migrations/go_version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ require github.com/gofiber/fiber/v2 v2.0.0`

var buf bytes.Buffer
cmd := newCmd(&buf)
fn := migrations.MigrateGoVersion("1.23")
fn := migrations.MigrateGoVersion("1.25")
require.NoError(t, fn(cmd, dir, nil, nil))

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")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

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)

assert.Contains(t, buf.String(), "1.25")

vendorContent := readFile(t, filepath.Join(vendor, "go.mod"))
assert.Contains(t, vendorContent, "go 1.10")
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/migrations/lists.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ var Migrations = []Migration{
v3migrations.MigrateBasicauthConfig,
v3migrations.MigrateBasicauthStorePassword,
v3migrations.MigrateReqHeaderParser,
MigrateGoVersion("1.24"),
MigrateGoVersion("1.25"),
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/gofiber/cli

go 1.24
go 1.25

require (
github.com/Masterminds/semver/v3 v3.4.0
Expand Down
Loading