Skip to content

Commit

Permalink
Add shortform command-line flags.
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuar committed Nov 21, 2021
1 parent 7a7d49e commit 684767c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ func init() {
// Cobra supports persistent flags, which, if defined here,
// will be global for your application.

rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.cf-ddns.yaml)")
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "c", "config file (default is $HOME/.cf-ddns.yaml)")
rootCmd.Flags().BoolVarP(&debugFlag, "debug", "d", false, "debug output")
rootCmd.Flags().BoolVarP(&profileFlag, "profile", "", false, "enable profiling")
rootCmd.Flags().BoolVarP(&profileFlag, "profile", "p", false, "enable profiling")
}

// initConfig reads in config file and ENV variables if set.
Expand Down

0 comments on commit 684767c

Please sign in to comment.