Skip to content

Commit

Permalink
Bump Go to 1.22.10 or 1.23.4 in go.mod files
Browse files Browse the repository at this point in the history
Signed-off-by: Glenn Lewis <6598971+gmlewis@users.noreply.github.com>
  • Loading branch information
gmlewis committed Dec 30, 2024
1 parent 5bfda1e commit e97f6d1
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 13 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,19 @@ the library is tested against Go version 1.22 and greater. go-github tracks
older versions of Go if we don't have to, but due to tooling constraints, we
don't always test older versions.

Go version 1.22 introduced significant changes to the pattern syntax and matching
behavior of `http.ServerMux` which causes a large number of legacy unit tests to break.
(See https://pkg.go.dev/net/http#hdr-Compatibility-ServeMux for more information.)
As a result, testing of this repo is currently performed by setting this env variable:

```bash
export GODEBUG=httpmuxgo121=1
```

An issue has been created (#3409) requesting assistance in updating all breaking legacy unit
tests when this `GODEBUG` environment variable is not set and Go 1.23.4 or later is
used to perform unit tests.

[support-policy]: https://golang.org/doc/devel/release.html#policy

If you're interested in using the [GraphQL API v4][], the recommended library is
Expand Down
4 changes: 1 addition & 3 deletions example/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/google/go-github/v68/example

go 1.22.5

toolchain go1.23.2
go 1.22.10

require (
github.com/ProtonMail/go-crypto v0.0.0-20230828082145-3c4c8a2d2371
Expand Down
4 changes: 1 addition & 3 deletions example/newreposecretwithlibsodium/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module newreposecretwithlibsodium

go 1.21

toolchain go1.22.0
go 1.22.10

require (
github.com/GoKillers/libsodium-go v0.0.0-20171022220152-dd733721c3cb
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ require (
github.com/google/go-querystring v1.1.0
)

go 1.21
go 1.22.10
4 changes: 1 addition & 3 deletions scrape/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module github.com/google/go-github/scrape

go 1.23

toolchain go1.23.4
go 1.23.4

require (
github.com/PuerkitoBio/goquery v1.10.1
Expand Down
2 changes: 2 additions & 0 deletions script/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
set -e

CDPATH="" cd -- "$(dirname -- "$0")/.."
# TODO(gmlewis): Remove this when #3409 is resolved.
export GODEBUG=httpmuxgo121=1

if [ "$#" = "0" ]; then
set -- -race -covermode atomic ./...
Expand Down
4 changes: 1 addition & 3 deletions tools/go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
module tools

go 1.21

toolchain go1.22.0
go 1.23.4

require (
github.com/alecthomas/kong v1.6.0
Expand Down

0 comments on commit e97f6d1

Please sign in to comment.