MCPcopy Create free account
hub / github.com/AndroidPoet/playconsole-cli / init

Function init

cmd/playconsole-cli/commands/auth/auth.go:65–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63)
64
65func init() {
66 // Login flags
67 loginCmd.Flags().StringVar(&profileName, "name", "default", "profile name")
68 loginCmd.Flags().StringVar(&credentialsPath, "credentials", "", "path to service account JSON file")
69 loginCmd.Flags().StringVar(&credentialsB64, "credentials-base64", "", "base64-encoded service account JSON")
70 loginCmd.Flags().StringVar(&defaultPackage, "default-package", "", "default package name for this profile")
71
72 // Switch flags
73 switchCmd.Flags().StringVar(&profileName, "name", "", "profile name to switch to")
74 cli.MustMarkFlagRequired(switchCmd, "name")
75
76 // Delete flags
77 deleteCmd.Flags().StringVar(&profileName, "name", "", "profile name to delete")
78 cli.MustMarkFlagRequired(deleteCmd, "name")
79 deleteCmd.Flags().Bool("confirm", false, "confirm deletion")
80
81 AuthCmd.AddCommand(loginCmd)
82 AuthCmd.AddCommand(switchCmd)
83 AuthCmd.AddCommand(listCmd)
84 AuthCmd.AddCommand(currentCmd)
85 AuthCmd.AddCommand(deleteCmd)
86}
87
88func runLogin(cmd *cobra.Command, args []string) error {
89 // Validate credentials source

Callers

nothing calls this directly

Calls 1

MustMarkFlagRequiredFunction · 0.92

Tested by

no test coverage detected