mirror of
https://github.com/ahmetb/kubectx.git
synced 2026-03-18 11:52:24 +00:00
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:
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@@ -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)"
|
||||
|
||||
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user