diff options
| author | Eric Paris <[email protected]> | 2015-08-05 09:45:11 -0500 |
|---|---|---|
| committer | Eric Paris <[email protected]> | 2015-08-05 09:45:11 -0500 |
| commit | af83f852cb3533df209ffef0b0f36b65d4594848 (patch) | |
| tree | 3d5326bdba286d4f3992d348caf6e944947903b8 | |
| parent | 67cbc198fd11dab704b214c1e629a97af392c085 (diff) | |
| parent | 3ff81a4d249e850a75cb2c3042156b31961e50a3 (diff) | |
Merge pull request #34 from eparis/slice-show-bracket
Show [] around string slices when showing the text
| -rw-r--r-- | string_slice.go | 3 |
1 files changed, 2 insertions, 1 deletions
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 @@ func (s *stringSliceValue) Type() string { 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 } |
