Show [] around string slices when showing the text This means things like autogenerated docs will show `--filename=[]` instead of just `--filename=`
diff --git a/string_slice.go b/string_slice.go index bbe6e00..b7096e8 100644 --- a/string_slice.go +++ b/string_slice.go
@@ -21,9 +21,10 @@ return "stringSlice" } -func (s *stringSliceValue) String() string { return strings.Join(*s, ",") } +func (s *stringSliceValue) String() string { return "[" + strings.Join(*s, ",") + "]" } func stringSliceConv(sval string) (interface{}, error) { + sval = strings.Trim(sval, "[]") v := strings.Split(sval, ",") return v, nil }