summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorCarlos Tadeu Panato Junior <ctadeu@gmail.com>2018-08-29 16:57:26 +0200
committerGitHub <noreply@github.com>2018-08-29 16:57:26 +0200
commit0da5c852f05faf6c08026b9a16f8362564b27915 (patch)
tree34b79983f93dd7f01fe898d2d9037a4b448213ca /cmd
parent0291730c2f2841e8181a2284f852a58294b28c51 (diff)
downloadchat-0da5c852f05faf6c08026b9a16f8362564b27915.tar.gz
chat-0da5c852f05faf6c08026b9a16f8362564b27915.tar.bz2
chat-0da5c852f05faf6c08026b9a16f8362564b27915.zip
add --username in the example for the commands (#9320)
* add --username in the example for the commands * update per review
Diffstat (limited to 'cmd')
-rw-r--r--cmd/mattermost/commands/channel.go12
1 files changed, 6 insertions, 6 deletions
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")