(inv *serpent.Invocation, variable codersdk.TemplateVersionVariable)
| 629 | } |
| 630 | |
| 631 | func promptForBoolVariable(inv *serpent.Invocation, variable codersdk.TemplateVersionVariable) (string, error) { |
| 632 | defaultValue := variable.DefaultValue |
| 633 | if defaultValue == "" { |
| 634 | defaultValue = "false" |
| 635 | } |
| 636 | |
| 637 | return cliui.Select(inv, cliui.SelectOptions{ |
| 638 | Options: []string{"true", "false"}, |
| 639 | Default: defaultValue, |
| 640 | Message: "Select value:", |
| 641 | }) |
| 642 | } |
| 643 | |
| 644 | func promptForNumberVariable(inv *serpent.Invocation, variable codersdk.TemplateVersionVariable) (string, error) { |
| 645 | prompt := "Enter value:" |
no test coverage detected