refactor: remove short flags

This commit is contained in:
Stavros
2025-01-22 21:50:01 +02:00
parent 4457d6f525
commit 143b13af2c
2 changed files with 5 additions and 5 deletions

View File

@@ -100,7 +100,7 @@ func HandleError(err error, msg string) {
func init() { func init() {
rootCmd.AddCommand(cmd.UserCmd()) rootCmd.AddCommand(cmd.UserCmd())
viper.AutomaticEnv() viper.AutomaticEnv()
rootCmd.Flags().IntP("port", "p", 3000, "Port to run the server on.") rootCmd.Flags().Int("port", 3000, "Port to run the server on.")
rootCmd.Flags().String("address", "0.0.0.0", "Address to bind the server to.") rootCmd.Flags().String("address", "0.0.0.0", "Address to bind the server to.")
rootCmd.Flags().String("secret", "", "Secret to use for the cookie.") rootCmd.Flags().String("secret", "", "Secret to use for the cookie.")
rootCmd.Flags().String("app-url", "", "The tinyauth URL.") rootCmd.Flags().String("app-url", "", "The tinyauth URL.")

View File

@@ -76,8 +76,8 @@ var CreateCmd = &cobra.Command{
} }
func init() { func init() {
CreateCmd.Flags().BoolVarP(&interactive, "interactive", "i", false, "Create a user interactively") CreateCmd.Flags().BoolVar(&interactive, "interactive", false, "Create a user interactively")
CreateCmd.Flags().BoolVarP(&docker, "docker", "d", false, "Format output for docker") CreateCmd.Flags().BoolVar(&docker, "docker", false, "Format output for docker")
CreateCmd.Flags().StringVarP(&username, "username", "u", "", "Username") CreateCmd.Flags().StringVar(&username, "username", "", "Username")
CreateCmd.Flags().StringVarP(&password, "password", "p", "", "Password") CreateCmd.Flags().StringVar(&password, "password", "", "Password")
} }