aboutsummaryrefslogtreecommitdiff
path: root/cmd/galleryd/flags.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/galleryd/flags.go')
-rw-r--r--cmd/galleryd/flags.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/cmd/galleryd/flags.go b/cmd/galleryd/flags.go
new file mode 100644
index 0000000..d3240d7
--- /dev/null
+++ b/cmd/galleryd/flags.go
@@ -0,0 +1,15 @@
+package main
+
+import "strings"
+
+// stringSliceFlag collects repeated string flags.
+type stringSliceFlag []string
+
+func (f *stringSliceFlag) String() string {
+ return strings.Join(*f, ",")
+}
+
+func (f *stringSliceFlag) Set(value string) error {
+ *f = append(*f, value)
+ return nil
+}