Update to Go 1.23-1.25, Actions v6, and golangci-lint v2.6.2#117
Update to Go 1.23-1.25, Actions v6, and golangci-lint v2.6.2#117mattfarina merged 6 commits intomasterfrom
Conversation
- Update Go versions to 1.23.x, 1.24.x, 1.25.x in workflow files - Update actions/setup-go from v1 to v6 - Update actions/checkout from v1 to v6 - Update golangci-lint from v1.45.0 to v2.6.2 - Migrate .golangci.yml to .golangci.yaml with v2 config format - Remove deprecated linters (deadcode, structcheck, varcheck, gosimple) - Add formatters section for gofmt and goimports - Update go.mod to Go 1.23 Co-authored-by: mattfarina <62991+mattfarina@users.noreply.github.com>
Update local-prefixes from helm.sh/helm/v3 to github.com/Masterminds/vcs to match the actual module path of this repository. Co-authored-by: mattfarina <62991+mattfarina@users.noreply.github.com>
|
@copilot io/ioutil is deprecated. Update the io/ioutil use to the new functions that replace its use. |
- Replace io/ioutil imports with io and os - Replace ioutil.ReadFile with os.ReadFile - Replace ioutil.ReadAll with io.ReadAll - Replace ioutil.Discard with io.Discard - Replace ioutil.TempDir with os.MkdirTemp - Update code comments to use new function names Co-authored-by: mattfarina <62991+mattfarina@users.noreply.github.com>
Updated all deprecated io/ioutil usage to use io and os packages. Changed ioutil.ReadFile to os.ReadFile, ioutil.ReadAll to io.ReadAll, ioutil.Discard to io.Discard, and ioutil.TempDir to os.MkdirTemp across all files. Commit: a1b8b92 |
|
@copilot In the test files, replace the use of os.MkdirTemp and its error handling with t.TempDir |
Replace os.MkdirTemp and manual cleanup with t.TempDir() which: - Automatically creates a temporary directory - Handles cleanup automatically when the test completes - Simplifies test code by removing error handling and defer statements This change reduces boilerplate code in test files while maintaining the same functionality. Co-authored-by: mattfarina <62991+mattfarina@users.noreply.github.com>
|
@copilot Fix the pull request so that it passes golangci-lint |
- Run gofmt to fix formatting issues (blank lines, comment alignment) - Handle error return values properly (errcheck) - Check return value from handleSubmodules - Use explicit blank identifier for deferred Close() calls - Remove deprecated build tags (keep only //go:build directives) - Fix error string capitalization (staticcheck ST1005) - Replace unused parameters with blank identifier (revive) - Use strings.ReplaceAll instead of strings.Replace (staticcheck QF1004) - Remove superfluous else after continue (revive) - Convert if-else chains to switch statements (staticcheck QF1003) - Make naked returns explicit in parseImportFromBody (nakedret) All linter checks now pass with 0 issues. Co-authored-by: mattfarina <62991+mattfarina@users.noreply.github.com>
Fixed all golangci-lint issues. The PR now passes with 0 linter issues. Changes include proper error handling, removed deprecated build tags, fixed error string capitalization, replaced unused parameters with blank identifiers, improved code style with switch statements, and made naked returns explicit. Commit: f124a14 |
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.