From 698d9c8895fbb117f536a8dff822240c55b3465b Mon Sep 17 00:00:00 2001 From: schnie Date: Thu, 8 Feb 2018 13:56:41 -0500 Subject: [PATCH 1/2] Scaffold users commands --- cmd/users.go | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 cmd/users.go diff --git a/cmd/users.go b/cmd/users.go new file mode 100644 index 000000000..5a12d8724 --- /dev/null +++ b/cmd/users.go @@ -0,0 +1,50 @@ +package cmd + +import "github.com/spf13/cobra" + +var ( + usersRootCmd = &cobra.Command{ + Use: "users", + Short: "Manage astronomer users", + Long: "Manage astronomer users", + } + + usersListCmd = &cobra.Command{ + Use: "list", + Short: "List astronomer users", + Long: "List astronomer users", + Run: usersList, + } + + usersCreateCmd = &cobra.Command{ + Use: "create", + Short: "Add an astronomer user", + Long: "Add an astronomer user", + Run: usersCreate, + } + + usersDeleteCmd = &cobra.Command{ + Use: "delete", + Short: "Delete an astronomer user", + Long: "Delete an astronomer user", + Run: usersDelete, + } +) + +func init() { + // Users root + RootCmd.AddCommand(usersRootCmd) + + usersRootCmd.AddCommand(usersListCmd) + usersRootCmd.AddCommand(usersCreateCmd) + usersRootCmd.AddCommand(usersDeleteCmd) +} + +func usersList(cmd *cobra.Command, args []string) { +} + +func usersCreate(cmd *cobra.Command, args []string) { +} + +func usersDelete(cmd *cobra.Command, args []string) { +} From d4f7bbaf946d032e02ef19010167d83a8b523c6f Mon Sep 17 00:00:00 2001 From: schnie Date: Thu, 8 Feb 2018 14:01:04 -0500 Subject: [PATCH 2/2] Add comments --- cmd/users.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmd/users.go b/cmd/users.go index 5a12d8724..cf36a224b 100644 --- a/cmd/users.go +++ b/cmd/users.go @@ -35,8 +35,13 @@ func init() { // Users root RootCmd.AddCommand(usersRootCmd) + // Users list usersRootCmd.AddCommand(usersListCmd) + + // Users create usersRootCmd.AddCommand(usersCreateCmd) + + // Users delete usersRootCmd.AddCommand(usersDeleteCmd) }