From 097cec8194a22d501606d6eb62ab3c3e23fc800a Mon Sep 17 00:00:00 2001 From: Hitoshi Mitake Date: Mon, 11 Apr 2016 13:01:19 +0900 Subject: [PATCH] etcdctl: let some v3 auth related functions be private They don't need to be public. --- etcdctl/ctlv3/command/auth_command.go | 4 ++-- etcdctl/ctlv3/command/user_command.go | 12 ++++++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/etcdctl/ctlv3/command/auth_command.go b/etcdctl/ctlv3/command/auth_command.go index 6b059a427..757bfac72 100644 --- a/etcdctl/ctlv3/command/auth_command.go +++ b/etcdctl/ctlv3/command/auth_command.go @@ -27,12 +27,12 @@ func NewAuthCommand() *cobra.Command { Short: "Enable or disable authentication.", } - ac.AddCommand(NewAuthEnableCommand()) + ac.AddCommand(newAuthEnableCommand()) return ac } -func NewAuthEnableCommand() *cobra.Command { +func newAuthEnableCommand() *cobra.Command { return &cobra.Command{ Use: "enable", Short: "enable authentication", diff --git a/etcdctl/ctlv3/command/user_command.go b/etcdctl/ctlv3/command/user_command.go index 770802d56..364562403 100644 --- a/etcdctl/ctlv3/command/user_command.go +++ b/etcdctl/ctlv3/command/user_command.go @@ -30,9 +30,9 @@ func NewUserCommand() *cobra.Command { Short: "user related command", } - ac.AddCommand(NewUserAddCommand()) - ac.AddCommand(NewUserDeleteCommand()) - ac.AddCommand(NewUserChangePasswordCommand()) + ac.AddCommand(newUserAddCommand()) + ac.AddCommand(newUserDeleteCommand()) + ac.AddCommand(newUserChangePasswordCommand()) return ac } @@ -41,7 +41,7 @@ var ( passwordInteractive bool ) -func NewUserAddCommand() *cobra.Command { +func newUserAddCommand() *cobra.Command { cmd := cobra.Command{ Use: "add ", Short: "add a new user", @@ -53,7 +53,7 @@ func NewUserAddCommand() *cobra.Command { return &cmd } -func NewUserDeleteCommand() *cobra.Command { +func newUserDeleteCommand() *cobra.Command { return &cobra.Command{ Use: "delete ", Short: "delete a user", @@ -61,7 +61,7 @@ func NewUserDeleteCommand() *cobra.Command { } } -func NewUserChangePasswordCommand() *cobra.Command { +func newUserChangePasswordCommand() *cobra.Command { cmd := cobra.Command{ Use: "passwd ", Short: "change password of user",