diff options
| author | shenwei356 <[email protected]> | 2016-10-07 00:41:20 +0800 |
|---|---|---|
| committer | shenwei356 <[email protected]> | 2016-10-07 00:41:20 +0800 |
| commit | 13e924deb5961431f4836dcb0e247254b9cc23d4 (patch) | |
| tree | 2b9a66ea31c8d882d5783cad12f02a5bc061a278 /string_slice.go | |
| parent | 4bd69631f4750a9df249ee317f4536e02cbc3c65 (diff) | |
fix bug of string_slice with square brackets
Diffstat (limited to 'string_slice.go')
| -rw-r--r-- | string_slice.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/string_slice.go b/string_slice.go index 51e3c5d..7829cfa 100644 --- a/string_slice.go +++ b/string_slice.go @@ -66,7 +66,7 @@ func (s *stringSliceValue) String() string { } func stringSliceConv(sval string) (interface{}, error) { - sval = strings.Trim(sval, "[]") + sval = sval[1 : len(sval)-1] // An empty string would cause a slice with one (empty) string if len(sval) == 0 { return []string{}, nil |
