Modernise Go idioms, clean up deps, add Go 1.24 to CI - #14
Merged
Merged
Conversation
Agent-Logs-Url: https://github.com/corbym/gocrest/sessions/bd8d44b4-392d-440e-85be-8ca12bb5a0db Co-authored-by: corbym <21261837+corbym@users.noreply.github.com>
Agent-Logs-Url: https://github.com/corbym/gocrest/sessions/bd8d44b4-392d-440e-85be-8ca12bb5a0db Co-authored-by: corbym <21261837+corbym@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
corbym
April 2, 2026 11:42
View session
corbym
marked this pull request as ready for review
April 2, 2026 11:45
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.
Brings the codebase up to current Go standards: replaces pre-1.18 idioms with their modern equivalents, removes unnecessary dependencies, and extends CI coverage to Go 1.24.
CI / build tooling
1.24.xto the build matrixgo mod tidy— removes three unused/deprecated indirect deps (golang.org/x/sys,golang.org/x/tools,golang.org/x/tools/cmd/cover)README
godoc.org→pkg.go.devGo idiom updates
interface{}→any(testingt.go,matcher.go,stubtestingt_test.go,then/eventually.go,matcher_test.go)map[interface{}]bool→ properly-typedmap[V]bool/map[T]boolinis/contains.go— the generic type parameters were alreadycomparable, so this was always validfor i := 0; i < len(x); i++→for _, v := range xthroughout (is/contains.go,is/allof.go,is/anyof.go,is/describe.go,has/haseveryelement.go)time.Duration(N)*time.Second→N*time.Secondfmt.Sprintf("%s", x)→ direct string assignment (is/allof.go)actual.(io.Reader)assertion —actualis already typed asio.Reader(by/eventually.go)Bug fix
WithinFiveSecondswas passing10*time.Secondas its timeout — corrected to5*time.Second.Dead code removal
Unused
actualKeysslice inmapActualMatchesExpected(is/contains.go) — built but never read.