chore: update golang to 1.24.1 (#17035)

- Update go.mod to use Go 1.24.1
- Update GitHub Actions setup-go action to use Go 1.24.1
- Fix linting issues with golangci-lint by:
  - Updating to golangci-lint v1.57.1 (more compatible with Go 1.24.1)

🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <claude@anthropic.com>
This commit is contained in:
Jon Ayers
2025-03-26 01:56:39 -05:00
committed by GitHub
parent c131d01cfd
commit 17ddee05e5
187 changed files with 650 additions and 531 deletions

View File

@ -104,7 +104,8 @@ func (r *RootCmd) create() *serpent.Command {
var template codersdk.Template
var templateVersionID uuid.UUID
if templateName == "" {
switch {
case templateName == "":
_, _ = fmt.Fprintln(inv.Stdout, pretty.Sprint(cliui.DefaultStyles.Wrap, "Select a template below to preview the provisioned infrastructure:"))
templates, err := client.Templates(inv.Context(), codersdk.TemplateFilter{})
@ -161,13 +162,13 @@ func (r *RootCmd) create() *serpent.Command {
template = templateByName[option]
templateVersionID = template.ActiveVersionID
} else if sourceWorkspace.LatestBuild.TemplateVersionID != uuid.Nil {
case sourceWorkspace.LatestBuild.TemplateVersionID != uuid.Nil:
template, err = client.Template(inv.Context(), sourceWorkspace.TemplateID)
if err != nil {
return xerrors.Errorf("get template by name: %w", err)
}
templateVersionID = sourceWorkspace.LatestBuild.TemplateVersionID
} else {
default:
templates, err := client.Templates(inv.Context(), codersdk.TemplateFilter{
ExactName: templateName,
})