MCPcopy Create free account
hub / github.com/auth0/auth0-cli / validateRequiredFlags

Function validateRequiredFlags

internal/cli/users.go:546–563  ·  view source on GitHub ↗
(inputs *userInput)

Source from the content-addressed store, hash-verified

544}
545
546func validateRequiredFlags(inputs *userInput) error {
547 switch inputs.connectionName {
548 case "email":
549 if inputs.email == "" {
550 return fmt.Errorf("required flag email not set")
551 }
552 case "sms":
553 if inputs.phoneNumber == "" {
554 return fmt.Errorf("required flag phone-number not set")
555 }
556 default:
557 if inputs.email == "" || inputs.password == "" {
558 return fmt.Errorf("required flag email or password not set")
559 }
560 }
561
562 return nil
563}
564
565func showUserCmd(cli *cli) *cobra.Command {
566 var inputs struct {

Callers 1

createUserCmdFunction · 0.85

Calls 1

ErrorfMethod · 0.80

Tested by

no test coverage detected