chore: go fix (Go 1.27 modernizers) - #1167
Merged
Merged
Conversation
Mechanical rewrite by 'go fix ./...', no behaviour changes: - 17 files: drop the obsolete '// +build' lines kept alongside '//go:build' (only needed for Go < 1.17) - log: continueOnFatal int32 + atomic.Load/Store -> atomic.Int32 - stringutils: hand-rolled loop -> slices.Contains - jsonIndent: negative clamp -> max() - sse, wormhole, googleai: strings.HasPrefix+slicing -> strings.CutPrefix - assorted 'for i := 0; i < n; i++' -> 'for range n' Verified: builds green for default, libcurl/crappy/keystore, nohl/fileonly and plugins/gcp/aws tag sets; go test ./... passes; golangci-lint v2 still reports 0 issues. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
batmac
enabled auto-merge (squash)
August 22, 2026 15:54
batmac
added a commit
that referenced
this pull request
Aug 22, 2026
- rename clipboard_test.go to clipboard_internal_test.go: it needs package-internal access, and the repo convention (enforced again now that golangci-lint works, see #1166) is _internal_test.go for those - drop the obsolete '// +build' lines, removed repo-wide in #1167 - name the opener 'cb' instead of 'clipboard', matching its cb:// scheme like the other openers and the existing cb mutator Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Merged
batmac
added a commit
that referenced
this pull request
Aug 22, 2026
* add cb:// opener * fix(openers): name the clipboard opener cb, follow test conventions - rename clipboard_test.go to clipboard_internal_test.go: it needs package-internal access, and the repo convention (enforced again now that golangci-lint works, see #1166) is _internal_test.go for those - drop the obsolete '// +build' lines, removed repo-wide in #1167 - name the opener 'cb' instead of 'clipboard', matching its cb:// scheme like the other openers and the existing cb mutator Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <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.
Second half of the #1164 cleanup, kept separate so the real fixes in #1166 stayed reviewable. Produced entirely by
go fix ./...— zero hand-written changes, no behaviour changes.Despite touching 32 files, the diff is small (+29/-54) and splits cleanly:
17 files — one deleted line each: the obsolete
// +buildcomment kept next to//go:build, only needed for Go < 1.17.15 files — small modernizations:
continueOnFatal int32+atomic.Load/Store→atomic.Int32pkg/logslices.Containspkg/stringutilsif indent < 0 { indent = 0 }→max(cfgInt(config), 0)jsonIndentstrings.HasPrefix+ manual slicing →strings.CutPrefixsse,wormhole,googleaifor i := 0; i < n; i++→for range nVerified
libcurl,crappy,keystore,nohl,fileonly,plugins,gcp,aws— this matters here, since the// +buildremovals touch constraint linesgo test ./...passesgolangci-lintv2 still reports 0 issuesReproducible with
go fix ./...on a Go 1.27 toolchain.🤖 Generated with Claude Code