Enable -a as a cli aliase for —auth on all commands

This commit is contained in:
Tobie Morgan Hitchcock 2017-11-24 19:49:53 +00:00
parent a569ad78d6
commit f1e4e3961a
3 changed files with 3 additions and 3 deletions

View file

@ -132,7 +132,7 @@ var exportCmd = &cobra.Command{
func init() { func init() {
exportCmd.PersistentFlags().StringVar(&opts.Auth.Auth, "auth", "root:root", "Master authentication details to use when connecting.") exportCmd.PersistentFlags().StringVarP(&opts.Auth.Auth, "auth", "a", "root:root", "Master authentication details to use when connecting.")
exportCmd.PersistentFlags().StringVar(&opts.DB.Host, "host", "surreal.io", "Database server host to connect to.") exportCmd.PersistentFlags().StringVar(&opts.DB.Host, "host", "surreal.io", "Database server host to connect to.")
exportCmd.PersistentFlags().StringVar(&opts.DB.Port, "port", "80", "Database server port to connect to.") exportCmd.PersistentFlags().StringVar(&opts.DB.Port, "port", "80", "Database server port to connect to.")

View file

@ -122,7 +122,7 @@ var importCmd = &cobra.Command{
func init() { func init() {
importCmd.PersistentFlags().StringVar(&opts.Auth.Auth, "auth", "root:root", "Master authentication details to use when connecting.") importCmd.PersistentFlags().StringVarP(&opts.Auth.Auth, "auth", "a", "root:root", "Master authentication details to use when connecting.")
importCmd.PersistentFlags().StringVar(&opts.DB.Host, "host", "surreal.io", "Database server host to connect to.") importCmd.PersistentFlags().StringVar(&opts.DB.Host, "host", "surreal.io", "Database server host to connect to.")
importCmd.PersistentFlags().StringVar(&opts.DB.Port, "port", "80", "Database server port to connect to.") importCmd.PersistentFlags().StringVar(&opts.DB.Port, "port", "80", "Database server port to connect to.")

View file

@ -140,7 +140,7 @@ var sqlCmd = &cobra.Command{
func init() { func init() {
sqlCmd.PersistentFlags().StringVar(&opts.Auth.Auth, "auth", "root:root", "Master authentication details to use when connecting.") sqlCmd.PersistentFlags().StringVarP(&opts.Auth.Auth, "auth", "a", "root:root", "Master authentication details to use when connecting.")
sqlCmd.PersistentFlags().StringVar(&opts.DB.Host, "host", "surreal.io", "Database server host to connect to.") sqlCmd.PersistentFlags().StringVar(&opts.DB.Host, "host", "surreal.io", "Database server host to connect to.")
sqlCmd.PersistentFlags().StringVar(&opts.DB.Port, "port", "80", "Database server port to connect to.") sqlCmd.PersistentFlags().StringVar(&opts.DB.Port, "port", "80", "Database server port to connect to.")