Skip to content

chore: bump go to 1.27.4 and adopt newer stdlib APIs - #25

Merged
danpasecinic merged 3 commits into
developmentfrom
chore/bump-go-1.27.4
Nov 15, 2026
Merged

danpasecinic merged 3 commits into
developmentfrom
chore/bump-go-1.27.4

Conversation

@danpasecinic

Copy link
Copy Markdown
Owner

Summary

  • Bump the go directive to 1.27.4 in both modules and CI to Go 1.27
  • Upgrade benchmark module dependencies (go-pretty 6.9.2, x/sys 0.50.0, x/text 0.44.0); dig, fx and samber/do were already latest
  • Fix a nil pointer panic in InvokeStruct when T is an interface: reflect.TypeOf(zero) was nil, reflect.TypeFor[T]() now yields an interface type and the existing "requires a struct type" error is returned
  • Adopt newer standard library APIs:
    • reflect.TypeFor[T]() in type key helpers instead of boxing a zero value with a nil fallback
    • reflect.Type.Fields() iterator and strings.SplitSeq for struct tag parsing, replacing a quadratic rune-by-rune splitTag
    • sync.WaitGroup.Go for parallel start, stop and health checks
    • errors.AsType behind one hasErrorCode helper for the Is* error predicates
    • strings.CutLast (new in 1.27), slices.Sort, slices.Contains, preallocated slices.AppendSeq over maps.Keys/maps.Values
    • go fix modernizers (range over int, slices.Contains, wg.Go) and slices.SortFunc with cmp.Compare in the benchmark runner

Notes

  • go 1.27.4 forces downstream modules to 1.27.4; the only 1.27 API used is strings.CutLast, so go 1.27.0 would be the real minimum
  • Go 1.27 generic methods would allow c.Invoke[T]() alongside needle.Invoke[T](c); left out as it is a public API decision

Benchmarks

Pending.

Test plan

  • go test -race -count=1 ./...
  • go vet ./... in both modules, golangci-lint run ./...
  • New TestInvokeStruct_InterfaceTypeReturnsError fails with a panic on main and passes here

@danpasecinic danpasecinic added the chore Maintenance label Nov 15, 2026
@danpasecinic danpasecinic self-assigned this Nov 15, 2026
@danpasecinic
danpasecinic marked this pull request as ready for review November 15, 2026 10:53
@danpasecinic
danpasecinic merged commit 4d10265 into development Nov 15, 2026
5 checks passed
@danpasecinic
danpasecinic deleted the chore/bump-go-1.27.4 branch November 15, 2026 10:54
@danpasecinic danpasecinic mentioned this pull request Nov 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Maintenance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant