From 0da5c852f05faf6c08026b9a16f8362564b27915 Mon Sep 17 00:00:00 2001 From: Carlos Tadeu Panato Junior Date: Wed, 29 Aug 2018 16:57:26 +0200 Subject: add --username in the example for the commands (#9320) * add --username in the example for the commands * update per review --- cmd/mattermost/commands/channel.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'cmd') diff --git a/cmd/mattermost/commands/channel.go b/cmd/mattermost/commands/channel.go index cbafac6b5..c57a0702d 100644 --- a/cmd/mattermost/commands/channel.go +++ b/cmd/mattermost/commands/channel.go @@ -80,12 +80,12 @@ Archived channels are appended with ' (archived)'.`, } var MoveChannelsCmd = &cobra.Command{ - Use: "move [team] [channels]", + Use: "move [team] [channels] --username [user]", Short: "Moves channels to the specified team", Long: `Moves the provided channels to the specified team. Validates that all users in the channel belong to the target team. Incoming/Outgoing webhooks are moved along with the channel. Channels can be specified by [team]:[channel]. ie. myteam:mychannel or by channel ID.`, - Example: " channel move newteam oldteam:mychannel", + Example: " channel move newteam oldteam:mychannel --username myusername", RunE: moveChannelsCmdF, } @@ -99,11 +99,11 @@ Channels can be specified by [team]:[channel]. ie. myteam:mychannel or by channe } var ModifyChannelCmd = &cobra.Command{ - Use: "modify [channel]", + Use: "modify [channel] [flags] --username [user]", Short: "Modify a channel's public/private type", Long: `Change the public/private type of a channel. Channel can be specified by [team]:[channel]. ie. myteam:mychannel or by channel ID.`, - Example: " channel modify myteam:mychannel --private", + Example: " channel modify myteam:mychannel --private --username myusername", RunE: modifyChannelCmdF, } @@ -343,7 +343,7 @@ func moveChannelsCmdF(command *cobra.Command, args []string) error { username, erru := command.Flags().GetString("username") if erru != nil || username == "" { - return errors.New("Username is required") + return errors.New("Username is required.") } user := getUserFromUserArg(a, username) @@ -473,7 +473,7 @@ func modifyChannelCmdF(command *cobra.Command, args []string) error { username, erru := command.Flags().GetString("username") if erru != nil || username == "" { - return errors.New("Username is required") + return errors.New("Username is required.") } public, _ := command.Flags().GetBool("public") -- cgit v1.2.3-1-g7c22