MCPcopy
hub / github.com/dnote/dnote / getUsername

Function getUsername

pkg/cli/cmd/login/login.go:81–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

79}
80
81func getUsername() (string, error) {
82 if usernameFlag != "" {
83 return usernameFlag, nil
84 }
85
86 var email string
87 if err := ui.PromptInput("email", &email); err != nil {
88 return "", errors.Wrap(err, "getting email input")
89 }
90 if email == "" {
91 return "", errors.New("Email is empty")
92 }
93
94 return email, nil
95}
96
97func getPassword() (string, error) {
98 if passwordFlag != "" {

Callers 1

newRunFunction · 0.85

Calls 2

PromptInputFunction · 0.92
NewMethod · 0.80

Tested by

no test coverage detected