Modernize for current Go toolchains#107
Merged
Merged
Conversation
The library already compiled and passed tests, but tooling and dependencies were stale. This brings everything up to current standards without changing public behavior. Library (go 1.23.0): - cmux_test.go: fix 8 `go vet` failures by sending writer-goroutine errors to the existing errCh (now buffered) instead of t.Fatal; ioutil.ReadAll -> io.ReadAll - matchers.go: io/ioutil -> io (io.Discard); gofmt -s doc comment - go.mod: go 1.11 -> 1.23.0; golang.org/x/net -> v0.42.0 (newest release that still permits a 1.23 directive) Example submodule: - golang.org/x/net/context -> stdlib context - grpc v1.27.0 -> v1.80, modern protobuf; helloworld now comes from the separate google.golang.org/grpc/examples module (requires go 1.25, isolated to this demo-only module) CI: - remove ancient .travis.yml (Go 1.6-1.8) - add .github/workflows/ci.yml: gofmt/vet/build/test -race for the library (Go 1.23 + 1.24 matrix) and the example Temporary() methods and TLS version defaults are intentionally unchanged: net.Error still requires Temporary(), and the TLS defaults are public-API behavior. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The library already compiled and passed tests, but its tooling and dependencies had gone stale. This brings everything up to current standards without changing public behavior.
Library (
go 1.23.0)cmux_test.go— fixes 8go vetfailures: three writer goroutines calledt.Fataloff the test goroutine; they now send to the existingerrCh(made buffered so the sends can't leak). Alsoioutil.ReadAll→io.ReadAll.matchers.go—io/ioutil→io(io.Discard);gofmt -sdoc-comment fix.go.mod—go 1.11→go 1.23.0;golang.org/x/netbumped from the 2020 snapshot to v0.42.0 (newest release that still permits a 1.23 directive — v0.45+ require 1.24).Example submodule (separate, demo-only)
golang.org/x/net/context→ stdlibcontext.v1.27.0→ v1.80, modern protobuf (deprecatedgithub.com/golang/protobufdropped).helloworldnow comes from the separategoogle.golang.org/grpc/examplesmodule, which requiresgo 1.25— isolated to this demo module; the importable library stays at 1.23.CI
.travis.yml(Go 1.6–1.8)..github/workflows/ci.yml:gofmt/vet/build/test -racefor the library (Go 1.23 + 1.24 matrix) and the example.Intentionally unchanged
Temporary()methods —net.Errorstill requires them; removing breaks compilation.tls.VersionSSL30/TLS10/TLS11) — changing the default whitelist is a public-API behavior change, out of scope.Verification
Both modules pass
gofmt -s,go vet,go build, andgo test -race.🤖 Generated with Claude Code