Skip to content

Commit

Permalink
Update the supported version to the same as Go itself
Browse files Browse the repository at this point in the history
Some of our dependences require the supported versions of Go.

For example github.com/golang/crypto now requires 1.23 or higher.
See: golang/crypto@89ff08d

For more information on the new policy of the Go team see: golang/go#69095
  • Loading branch information
dependabot[bot] authored and erikdubbelboer committed Feb 26, 2025
1 parent b8969ed commit 7ac2304
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [1.22.x, 1.23.x, 1.24.x]
go-version: [1.23.x, 1.24.x]
os: [ubuntu-latest, macos-latest, windows-latest, macos-14]
runs-on: ${{ matrix.os }}
steps:
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,9 @@ This is an **unsafe** way, the result string and `[]byte` buffer share the same

* *Which GO versions are supported by fasthttp?*

Go 1.22.x and newer. Older versions might work, but won't officially be supported.
We support the same versions the Go team supports.
Currently that is Go 1.23.x and newer.
Older versions might work, but won't officially be supported.

* *Please provide real benchmark data and server information*

Expand Down
2 changes: 1 addition & 1 deletion fs_fs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ func TestFSFSCompressConcurrent(t *testing.T) {
for i := 0; i < concurrency; i++ {
select {
case <-ch:
case <-time.After(time.Second * 2):
case <-time.After(time.Second * 4):
t.Fatalf("timeout")
}
}
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
module github.com/valyala/fasthttp

go 1.22
go 1.23.0

require (
github.com/andybalholm/brotli v1.1.1
github.com/klauspost/compress v1.18.0
github.com/valyala/bytebufferpool v1.0.0
golang.org/x/crypto v0.33.0
golang.org/x/crypto v0.35.0
golang.org/x/net v0.35.0
golang.org/x/sys v0.30.0
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6Kllzaw
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU=
github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E=
golang.org/x/crypto v0.33.0 h1:IOBPskki6Lysi0lo9qQvbxiQ+FvsCC/YWOecCHAixus=
golang.org/x/crypto v0.33.0/go.mod h1:bVdXmD7IV/4GdElGPozy6U7lWdRXA4qyRVGJV57uQ5M=
golang.org/x/crypto v0.35.0 h1:b15kiHdrGCHrP6LvwaQ3c03kgNhhiMgvlhxHQhmg2Xs=
golang.org/x/crypto v0.35.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ=
golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8=
golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk=
golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
Expand Down
4 changes: 2 additions & 2 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1706,7 +1706,7 @@ func (s *Server) ServeTLS(ln net.Listener, certFile, keyFile string) error {

// BuildNameToCertificate has been deprecated since 1.14.
// But since we also support older versions we'll keep this here.
s.TLSConfig.BuildNameToCertificate() //nolint:staticcheck
s.TLSConfig.BuildNameToCertificate()

s.mu.Unlock()

Expand Down Expand Up @@ -1734,7 +1734,7 @@ func (s *Server) ServeTLSEmbed(ln net.Listener, certData, keyData []byte) error

// BuildNameToCertificate has been deprecated since 1.14.
// But since we also support older versions we'll keep this here.
s.TLSConfig.BuildNameToCertificate() //nolint:staticcheck
s.TLSConfig.BuildNameToCertificate()

s.mu.Unlock()

Expand Down
2 changes: 1 addition & 1 deletion server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3657,7 +3657,7 @@ func TestCloseOnShutdown(t *testing.T) {
done := 0
for {
select {
case <-time.After(time.Second):
case <-time.After(time.Second * 2):
t.Fatal("shutdown took too long")
case <-serveCh:
done++
Expand Down

0 comments on commit 7ac2304

Please sign in to comment.