Skip to content
Myr

cmd: Delete projectBase flag

Before adoption: this commit came in with the history the project adopted, so no landing records it.

It's redundant and it didn't work earlier anyway.

authored by Albert Nigmatzianov · committed by Albert Nigmatzianov · parent 7918bf6 · Browse files · 1 file+4 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+4 added−6 removed

  • other:+4 added−6 removed

1 file+4 added−6 removed

modified:cobra/cmd/root.go+4 added-6 removed
21 unmodified lines
22)2324var (25 // Used for flags.26 cfgFile, projectBase, userLicense string26 cfgFile, userLicense string2728 rootCmd = &cobra.Command{29 Use: "cobra",30 Short: "A generator for Cobra based Applications",
13 unmodified lines
44func init() {45 initViper()4647 rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.cobra.yaml)")48 rootCmd.PersistentFlags().StringVarP(&projectBase, "projectbase", "b", "", "base project directory, e.g. github.com/spf13/")49 rootCmd.PersistentFlags().StringP("author", "a", "YOUR NAME", "Author name for copyright attribution")50 rootCmd.PersistentFlags().StringVarP(&userLicense, "license", "l", "", "Name of license for the project (can provide `license` in config)")51 rootCmd.PersistentFlags().Bool("viper", true, "Use Viper for configuration")48 rootCmd.PersistentFlags().StringP("author", "a", "YOUR NAME", "author name for copyright attribution")49 rootCmd.PersistentFlags().StringVarP(&userLicense, "license", "l", "", "name of license for the project (can provide `license` in config)")50 rootCmd.PersistentFlags().Bool("viper", true, "use Viper for configuration")51 viper.BindPFlag("author", rootCmd.PersistentFlags().Lookup("author"))53 viper.BindPFlag("projectbase", rootCmd.PersistentFlags().Lookup("projectbase"))52 viper.BindPFlag("useViper", rootCmd.PersistentFlags().Lookup("viper"))53 viper.SetDefault("author", "NAME HERE <EMAIL ADDRESS>")54 viper.SetDefault("license", "apache")55
27 unmodified lines