From e3b036bc5744ce422524035c015970b3def25cdf Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Fri, 12 Jul 2019 12:34:35 -0400 Subject: [PATCH] Added a group addMember command --- cmd/group/addMember.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/group/addMember.go b/cmd/group/addMember.go index bec68f4..a052b4d 100644 --- a/cmd/group/addMember.go +++ b/cmd/group/addMember.go @@ -16,14 +16,14 @@ import ( func init() { // define group add subcommand flags - groupAddCmd.Flags().StringP("base_ou", "o", "", "LDAP OU to search for the group entry under") - groupAddCmd.Flags().StringP("id_attribute", "a", "cn", "LDAP DN attribute for groups") - groupAddCmd.Flags().StringVarP(&flagGroupName, "group_name", "n", "", "Name for the group") - groupAddCmd.Flags().StringVarP(&flagGroupType, "group_type", "t", "unix", "Type of the group") - groupAddCmd.Flags().StringVarP(&flagGroupMembers, "group_members", "m", "", "Members to add to the group (comma-separated list)") + groupAddMemberCmd.Flags().StringP("base_ou", "o", "", "LDAP OU to search for the group entry under") + groupAddMemberCmd.Flags().StringP("id_attribute", "a", "cn", "LDAP DN attribute for groups") + groupAddMemberCmd.Flags().StringVarP(&flagGroupName, "group_name", "n", "", "Name for the group") + groupAddMemberCmd.Flags().StringVarP(&flagGroupType, "group_type", "t", "unix", "Type of the group") + groupAddMemberCmd.Flags().StringVarP(&flagGroupMembers, "group_members", "m", "", "Members to add to the group (comma-separated list)") // bind config file values to group add flags - viper.BindPFlag("group.base_ou", groupAddCmd.Flags().Lookup("base_ou")) - viper.BindPFlag("group.id_attr", groupAddCmd.Flags().Lookup("id_attribute")) + viper.BindPFlag("group.base_ou", groupAddMemberCmd.Flags().Lookup("base_ou")) + viper.BindPFlag("group.id_attr", groupAddMemberCmd.Flags().Lookup("id_attribute")) } // define group add subcommand