-
-
Notifications
You must be signed in to change notification settings - Fork 43
/
login.go
24 lines (20 loc) · 855 Bytes
/
login.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/spf13/cobra"
)
var loginCmd = &cobra.Command{
Use: "login",
Short: "Save an api token from the registry locally. If token is not specified, it will be read from stdin.",
Run: func(cmd *cobra.Command, args []string) {},
}
func init() {
carapace.Gen(loginCmd).Standalone()
loginCmd.Flags().Bool("generate-keypair", false, "Generate a public/secret keypair (unstable)")
loginCmd.Flags().BoolP("help", "h", false, "Print help")
loginCmd.Flags().String("key-subject", "", "Set the key subject for this registry (unstable)")
loginCmd.Flags().BoolP("quiet", "q", false, "Do not print cargo log messages")
loginCmd.Flags().String("registry", "", "Registry to use")
loginCmd.Flags().Bool("secret-key", false, "Prompt for secret key (unstable)")
rootCmd.AddCommand(loginCmd)
}