MCPcopy Index your code
hub / github.com/coder/coder / promptFirstName

Function promptFirstName

cli/login.go:61–74  ·  view source on GitHub ↗
(inv *serpent.Invocation)

Source from the content-addressed store, hash-verified

59}
60
61func promptFirstName(inv *serpent.Invocation) (string, error) {
62 name, err := cliui.Prompt(inv, cliui.PromptOptions{
63 Text: "(Optional) What " + pretty.Sprint(cliui.DefaultStyles.Field, "name") + " would you like?",
64 Default: "",
65 })
66 if err != nil {
67 if errors.Is(err, cliui.ErrCanceled) {
68 return "", nil
69 }
70 return "", err
71 }
72
73 return name, nil
74}
75
76func promptFirstPassword(inv *serpent.Invocation) (string, error) {
77retry:

Callers 1

loginMethod · 0.85

Calls 2

PromptFunction · 0.92
IsMethod · 0.45

Tested by

no test coverage detected