From eaa5aecd422bc4f6b01b6257383521ad512e08f7 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Sat, 11 Aug 2018 23:25:17 +0200 Subject: cli: add multipleStrings type Will be used for --exclude. --- cli_args.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'cli_args.go') 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 -- cgit v1.2.3