summaryrefslogtreecommitdiff
path: root/internal/config/flags.go
diff options
context:
space:
mode:
authorLibravatar rdelaage <romain@delaage.fr>2023-08-23 18:01:16 +0200
committerLibravatar GitHub <noreply@github.com>2023-08-23 18:01:16 +0200
commit7b48437f172e11daa77c842b18813d5654143cb0 (patch)
tree51076d12313718ca0e1b8ffe1dce37a2b866c97c /internal/config/flags.go
parent[feature] Add rate limit exceptions option, use ISO8601 for rate limit reset ... (diff)
downloadgotosocial-7b48437f172e11daa77c842b18813d5654143cb0.tar.xz
[feature] list commands for both attachment and emojis (#2121)
* [feature] list commands for both attachment and emojis * use fewer commands, provide `local-only` and `remote-only` as filters * envparsing --------- Co-authored-by: Romain de Laage <romain.delaage@rdelaage.ovh> Co-authored-by: tsmethurst <tobi.smethurst@protonmail.com>
Diffstat (limited to 'internal/config/flags.go')
-rw-r--r--internal/config/flags.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/internal/config/flags.go b/internal/config/flags.go
index ad07ec2ef..74ceedc00 100644
--- a/internal/config/flags.go
+++ b/internal/config/flags.go
@@ -203,6 +203,17 @@ func AddAdminTrans(cmd *cobra.Command) {
}
}
+// AddAdminMediaList attaches flags pertaining to media list commands.
+func AddAdminMediaList(cmd *cobra.Command) {
+ localOnly := AdminMediaListLocalOnlyFlag()
+ localOnlyUsage := fieldtag("AdminMediaListLocalOnly", "usage")
+ cmd.Flags().Bool(localOnly, false, localOnlyUsage)
+
+ remoteOnly := AdminMediaListRemoteOnlyFlag()
+ remoteOnlyUsage := fieldtag("AdminMediaListRemoteOnly", "usage")
+ cmd.Flags().Bool(remoteOnly, false, remoteOnlyUsage)
+}
+
// AddAdminMediaPrune attaches flags pertaining to media storage prune commands.
func AddAdminMediaPrune(cmd *cobra.Command) {
name := AdminMediaPruneDryRunFlag()