refactor: modernize Go codebase for Go 1.25

- Replace deprecated io/ioutil with os.ReadFile, os.WriteFile, etc.
- Replace interface{} with any
- Replace github.com/pkg/errors with stdlib fmt.Errorf %w wrapping
- Use errors.As() instead of direct type assertions on errors
- Use strings.Cut() for delimiter parsing
- Use slices.Contains() for linear searches
- Use t.Setenv() and t.TempDir() in tests
- Update CI workflows to Go 1.25

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ahmet Alp Balkan
2026-03-08 16:31:29 -07:00
parent defbc123a4
commit 51d9e8e055
34 changed files with 167 additions and 238 deletions

View File

@@ -25,7 +25,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: '1.22'
go-version: '1.25'
- id: go-cache-paths
run: |
echo "::set-output name=go-build::$(go env GOCACHE)"

View File

@@ -29,7 +29,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v6
with:
go-version: '1.22'
go-version: '1.25'
- name: Install Snapcraft
uses: samuelmeuli/action-snapcraft@v3
- name: Setup Snapcraft