From f1e4e3961a6e89f7bbb163ff6a70a91d87e60b0c Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Fri, 24 Nov 2017 19:49:53 +0000 Subject: [PATCH] =?UTF-8?q?Enable=20-a=20as=20a=20cli=20aliase=20for=20?= =?UTF-8?q?=E2=80=94auth=20on=20all=20commands?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cli/export.go | 2 +- cli/import.go | 2 +- cli/sql.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/export.go b/cli/export.go index 82d13ea9..48020890 100644 --- a/cli/export.go +++ b/cli/export.go @@ -132,7 +132,7 @@ var exportCmd = &cobra.Command{ 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.Port, "port", "80", "Database server port to connect to.") diff --git a/cli/import.go b/cli/import.go index a39e9645..3bd472ce 100644 --- a/cli/import.go +++ b/cli/import.go @@ -122,7 +122,7 @@ var importCmd = &cobra.Command{ 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.Port, "port", "80", "Database server port to connect to.") diff --git a/cli/sql.go b/cli/sql.go index 7283a0a5..496cca4e 100644 --- a/cli/sql.go +++ b/cli/sql.go @@ -140,7 +140,7 @@ var sqlCmd = &cobra.Command{ 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.Port, "port", "80", "Database server port to connect to.")