Apply Go 1.26.1 coding standards via go fix - #30
Merged
Conversation
- files/reader.go: Replace deprecated ioutil.ReadFile with os.ReadFile - files/writer.go: Replace deprecated ioutil.WriteFile with os.WriteFile - files/glob.go: Replace sort.Slice with slices.Sort - files/glob.go: Replace manual loop with slices.Contains - parser/parser.go: Replace strings.Split with strings.SplitSeq in 3 for-range loops Co-authored-by: tomodian <158877+tomodian@users.noreply.github.com>
tomodian
marked this pull request as ready for review
March 10, 2026 15:30
Copilot
AI
changed the title
[WIP] Apply Go 1.26.1 coding standards to the codebase
Apply Go 1.26.1 coding standards via Mar 10, 2026
go fix
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.
Run
go fix ./...to apply all Go 1.26.1 idiomatic transformations across the codebase.io/ioutilremoval (files/reader.go,files/writer.go):ioutil.ReadFile/ioutil.WriteFile→os.ReadFile/os.WriteFileslicespackage adoption (files/glob.go):sort.Slice→slices.Sort; manual containment loop →slices.Containsparser/parser.go):for _, line := range strings.Split(...)→for line := range strings.SplitSeq(...)inShow,Latest,LatestAny— avoids intermediate slice allocationWarning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
get.anchore.io/usr/bin/curl curl -w %{http_code} -sL -o /tmp/tmp.YLLerNsPIR REDACTED -gensymabis -o /tmp/go-build1384428979/b005/symabis /opt/hostedtoolcache/go/1.24.13/x64/src/internal/abi/abi_test.s /opt/hostedtoolcache/go/1.24.13/x64/src/internal/abi/stub.s -###�� -x c rg/toolchain@v0.0.1-go1.26.1.linux-amd64/pkg/tool/linux_amd64/asm - x l/linux_amd64/fi/tmp/go-build1384428979/b011/_pkg_.a rg/toolchain@v0.-trimpath(dns block)If you need me to access, download, or install something from one of these locations, you can either:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.