diff --git a/common/mflagext/listvar.go b/common/mflagext/listvar.go deleted file mode 100644 index c385e2cd..00000000 --- a/common/mflagext/listvar.go +++ /dev/null @@ -1,31 +0,0 @@ -package mflagext - -import ( - "fmt" - - "github.com/weaveworks/common/mflag" -) - -type listOpts struct { - value *[]string - hasBeenSet bool -} - -func ListVar(p *[]string, names []string, value []string, usage string) { - *p = value - mflag.Var(&listOpts{p, false}, names, usage) -} - -func (opts *listOpts) Set(value string) error { - if opts.hasBeenSet { - (*opts.value) = append((*opts.value), value) - } else { - (*opts.value) = []string{value} - opts.hasBeenSet = true - } - return nil -} - -func (opts *listOpts) String() string { - return fmt.Sprintf("%v", []string(*opts.value)) -} diff --git a/prog/weaveproxy/main.go b/prog/weaveproxy/main.go index 3f6b0644..bf326187 100644 --- a/prog/weaveproxy/main.go +++ b/prog/weaveproxy/main.go @@ -6,9 +6,9 @@ import ( "strings" "github.com/weaveworks/common/mflag" + "github.com/weaveworks/common/mflagext" "github.com/weaveworks/common/signals" "github.com/weaveworks/weave/common" - "github.com/weaveworks/weave/common/mflagext" "github.com/weaveworks/weave/proxy" )