mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
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:
@ -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,
|
||||
})
|
||||
|
Reference in New Issue
Block a user