MCPcopy Index your code
hub / github.com/dnote/dnote / getPassword

Function getPassword

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

Source from the content-addressed store, hash-verified

95}
96
97func getPassword() (string, error) {
98 if passwordFlag != "" {
99 return passwordFlag, nil
100 }
101
102 var password string
103 if err := ui.PromptPassword("password", &password); err != nil {
104 return "", errors.Wrap(err, "getting password input")
105 }
106 if password == "" {
107 return "", errors.New("Password is empty")
108 }
109
110 return password, nil
111}
112
113func getBaseURL(rawURL string) (string, error) {
114 u, err := url.Parse(rawURL)

Callers 1

newRunFunction · 0.85

Calls 2

PromptPasswordFunction · 0.92
NewMethod · 0.80

Tested by

no test coverage detected