From b3fa317dd0e3fec452d5f0b9d9ebbe6ed7d127b4 Mon Sep 17 00:00:00 2001 From: Dan Anglin Date: Thu, 1 Aug 2024 01:31:46 +0100 Subject: [PATCH] add constant values for the flags --- internal/executor/flags.go | 2 ++ internal/executor/show.go | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/executor/flags.go b/internal/executor/flags.go index 61a5a80..bbc48d1 100644 --- a/internal/executor/flags.go +++ b/internal/executor/flags.go @@ -14,6 +14,8 @@ import ( const ( flagAddPoll = "add-poll" flagAccountName = "account-name" + flagAllImages = "all-images" + flagAllVideos = "all-videos" flagAttachmentID = "attachment-id" flagBrowser = "browser" flagContentType = "content-type" diff --git a/internal/executor/show.go b/internal/executor/show.go index 7e76119..c2b6943 100644 --- a/internal/executor/show.go +++ b/internal/executor/show.go @@ -64,8 +64,8 @@ func NewShowExecutor(printer *printer.Printer, config *config.Config, name, summ showExe.BoolVar(&showExe.onlyPinned, flagOnlyPinned, false, "Set to true to show only the account's pinned statuses") showExe.BoolVar(&showExe.onlyMedia, flagOnlyMedia, false, "Set to true to show only the statuses with media attachments") showExe.BoolVar(&showExe.onlyPublic, flagOnlyPublic, false, "Set to true to show only the account's public posts") - showExe.BoolVar(&showExe.getAllImages, "all-images", false, "Set to true to show all images from a status") - showExe.BoolVar(&showExe.getAllVideos, "all-videos", false, "Set to true to show all videos from a status") + showExe.BoolVar(&showExe.getAllImages, flagAllImages, false, "Set to true to show all images from a status") + showExe.BoolVar(&showExe.getAllVideos, flagAllVideos, false, "Set to true to show all videos from a status") showExe.StringVar(&showExe.resourceType, flagType, "", "Specify the type of resource to display") showExe.StringVar(&showExe.accountName, flagAccountName, "", "Specify the account name in full (username@domain)") showExe.StringVar(&showExe.statusID, flagStatusID, "", "Specify the ID of the status to display")