MCPcopy Create free account
hub / github.com/cloudbase/garm / promptUnsetInitVariables

Function promptUnsetInitVariables

cmd/garm-cli/cmd/init.go:168–198  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

166}
167
168func promptUnsetInitVariables() error {
169 var err error
170 if loginUserName == "" {
171 loginUserName, err = common.PromptString("Username")
172 if err != nil {
173 return err
174 }
175 }
176
177 if loginEmail == "" {
178 loginEmail, err = common.PromptString("Email")
179 if err != nil {
180 return err
181 }
182 }
183
184 if loginPassword == "" {
185 passwd, err := common.PromptPassword("Password", "")
186 if err != nil {
187 return err
188 }
189
190 _, err = common.PromptPassword("Confirm password", passwd)
191 if err != nil {
192 return err
193 }
194 loginPassword = passwd
195 }
196
197 return nil
198}
199
200func init() {
201 rootCmd.AddCommand(initCmd)

Callers 1

init.goFile · 0.85

Calls 2

PromptStringFunction · 0.92
PromptPasswordFunction · 0.92

Tested by

no test coverage detected