Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename defaults arg to defaultOverrides
  • Loading branch information
aaronlehmann committed Apr 29, 2024
commit abaee392e6cd9667e415b9ad87c23643d3b52392
4 changes: 2 additions & 2 deletions cli/cliui/parameter.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"github.com/coder/serpent"
)

func RichParameter(inv *serpent.Invocation, templateVersionParameter codersdk.TemplateVersionParameter, defaults map[string]string) (string, error) {
func RichParameter(inv *serpent.Invocation, templateVersionParameter codersdk.TemplateVersionParameter, defaultOverrides map[string]string) (string, error) {
label := templateVersionParameter.Name
if templateVersionParameter.DisplayName != "" {
label = templateVersionParameter.DisplayName
Expand All @@ -27,7 +27,7 @@ func RichParameter(inv *serpent.Invocation, templateVersionParameter codersdk.Te
}

defaultValue := templateVersionParameter.DefaultValue
if v, ok := defaults[templateVersionParameter.Name]; ok {
if v, ok := defaultOverrides[templateVersionParameter.Name]; ok {
defaultValue = v
}

Expand Down