From 5ec1cc0e1846b477c57fdb4cc34cd988abf3091b Mon Sep 17 00:00:00 2001 From: Dan Anglin Date: Wed, 3 Jul 2024 13:21:32 +0100 Subject: [PATCH] fix: rename the choose flag. Rename to choose flag to vote for voting in polls. --- internal/executor/add.go | 4 ++-- internal/executor/flags.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/executor/add.go b/internal/executor/add.go index ab6e7e2..75fc7d6 100644 --- a/internal/executor/add.go +++ b/internal/executor/add.go @@ -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) diff --git a/internal/executor/flags.go b/internal/executor/flags.go index cba9dd2..1f85e7c 100644 --- a/internal/executor/flags.go +++ b/internal/executor/flags.go @@ -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