summaryrefslogtreecommitdiff
path: root/cli_args.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2018-08-11 23:25:17 +0200
committerJakob Unterwurzacher2018-08-11 23:25:17 +0200
commiteaa5aecd422bc4f6b01b6257383521ad512e08f7 (patch)
tree486d98da0b415cb602f87b444b789b2de18cb497 /cli_args.go
parent06f1ea951b03b4a0e8f6090c6657b8e0238da271 (diff)
cli: add multipleStrings type
Will be used for --exclude.
Diffstat (limited to 'cli_args.go')
-rw-r--r--cli_args.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/cli_args.go b/cli_args.go
index 69e8bdf..1314ed7 100644
--- a/cli_args.go
+++ b/cli_args.go
@@ -39,6 +39,18 @@ type argContainer struct {
_forceOwner *fuse.Owner
}
+type multipleStrings []string
+
+func (s *multipleStrings) String() string {
+ s2 := []string(*s)
+ return fmt.Sprint(s2)
+}
+
+func (s *multipleStrings) Set(val string) error {
+ *s = append(*s, val)
+ return nil
+}
+
var flagSet *flag.FlagSet
// prefixOArgs transform options passed via "-o foo,bar" into regular options