1
0
mirror of https://github.com/kha7iq/pingme.git synced 2025-05-15 14:20:18 -07:00

fix: set variables and flag for message

This commit is contained in:
kha7iq 2021-05-20 13:54:55 +08:00
parent a4146c8a79
commit 36a6d8abbd

View File

@ -85,33 +85,30 @@ You can specify multiple userIds by separating the value with ','.`,
Destination: &zulipOpts.Type,
Name: "type",
Aliases: []string{},
Required: true,
Usage: "The type of message to be sent. private for a private message and stream for a stream message.",
EnvVars: []string{},
EnvVars: []string{"ZULIP_MSG_TYPE"},
},
&cli.StringFlag{
Destination: &zulipOpts.To,
Name: "to",
Aliases: []string{},
Required: true,
Usage: "For stream messages, the name of the stream. For private messages, csv of email addresses",
EnvVars: []string{},
EnvVars: []string{"ZULIP_STREAM_NAME"},
},
&cli.StringFlag{
Destination: &zulipOpts.Topic,
Name: "topic",
Aliases: []string{},
Required: true,
Usage: "The topic of the message. Only required for stream messages (type=\"stream\"), ignored otherwise.",
EnvVars: []string{},
Usage: "The topic of the message. Only required for stream messages 'type=stream', ignored otherwise.",
EnvVars: []string{"ZULIP_TOPIC"},
},
&cli.StringFlag{
Destination: &zulipOpts.Content,
Name: "content",
Name: "msg",
Aliases: []string{},
Required: true,
Usage: "The content of the message.",
EnvVars: []string{},
EnvVars: []string{"ZULIP_MESSAGE"},
},
},
Action: func(ctx *cli.Context) error {