fix: rename the choose flag.
Rename to choose flag to vote for voting in polls.
This commit is contained in:
parent
1541aa6936
commit
5ec1cc0e18
2 changed files with 3 additions and 3 deletions
|
@ -47,7 +47,7 @@ func NewAddExecutor(printer *printer.Printer, config *config.Config, name, summa
|
|||
addExe.StringVar(&addExe.content, flagContent, "", "The content of the resource")
|
||||
addExe.StringVar(&addExe.pollID, flagPollID, "", "The ID of the poll")
|
||||
addExe.Var(&addExe.accountNames, flagAccountName, "The name of the account")
|
||||
addExe.Var(&addExe.choices, flagChoose, "Specify your choice ")
|
||||
addExe.Var(&addExe.choices, flagVote, "Your vote")
|
||||
|
||||
addExe.Usage = commandUsageFunc(name, summary, addExe.FlagSet)
|
||||
|
||||
|
@ -270,7 +270,7 @@ func (a *AddExecutor) addToPoll(gtsClient *client.Client) error {
|
|||
|
||||
func (a *AddExecutor) addVoteToPoll(gtsClient *client.Client) error {
|
||||
if len(a.choices) == 0 {
|
||||
return errors.New("please use --" + flagChoose + " to make a choice in this poll")
|
||||
return errors.New("please use --" + flagVote + " to make a choice in this poll")
|
||||
}
|
||||
|
||||
poll, err := gtsClient.GetPoll(a.pollID)
|
||||
|
|
|
@ -16,7 +16,6 @@ const (
|
|||
flagAccountName = "account-name"
|
||||
flagAttachmentID = "attachment-id"
|
||||
flagBrowser = "browser"
|
||||
flagChoose = "choose"
|
||||
flagContentType = "content-type"
|
||||
flagContent = "content"
|
||||
flagEnableFederation = "enable-federation"
|
||||
|
@ -52,6 +51,7 @@ const (
|
|||
flagTo = "to"
|
||||
flagType = "type"
|
||||
flagVisibility = "visibility"
|
||||
flagVote = "vote"
|
||||
)
|
||||
|
||||
type MultiStringFlagValue []string
|
||||
|
|
Loading…
Reference in a new issue