(flagSet *pflag.FlagSet, args []string)
| 45 | var errNoUserID = errors.DefineInvalidArgument("no_user_id", "no user ID set") |
| 46 | |
| 47 | func getUserID(flagSet *pflag.FlagSet, args []string) *ttnpb.UserIdentifiers { |
| 48 | var userID string |
| 49 | if len(args) > 0 { |
| 50 | if len(args) > 1 { |
| 51 | logger.Warn("Multiple IDs found in arguments, considering only the first") |
| 52 | } |
| 53 | userID = args[0] |
| 54 | } else { |
| 55 | userID, _ = flagSet.GetString("user-id") |
| 56 | } |
| 57 | if userID == "" { |
| 58 | return nil |
| 59 | } |
| 60 | return &ttnpb.UserIdentifiers{UserId: userID} |
| 61 | } |
| 62 | |
| 63 | func printPasswordRequirements(msg *ttnpb.IsConfiguration_UserRegistration_PasswordRequirements) { |
| 64 | if msg == nil { |
no test coverage detected