diff options
| author | therealmitchconnors <[email protected]> | 2019-08-16 12:07:51 -0700 |
|---|---|---|
| committer | therealmitchconnors <[email protected]> | 2019-08-16 12:07:51 -0700 |
| commit | c6c0f0fd30b9b96d1c9a1cbf90799706bd501458 (patch) | |
| tree | efaa9517c592bcb7b84bca3676e8437d160cf43f /string_slice.go | |
| parent | 24fa6976df40757dce6aea913e7b81ade90530e1 (diff) | |
Add first SliceValue implementations
Diffstat (limited to 'string_slice.go')
| -rw-r--r-- | string_slice.go | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/string_slice.go b/string_slice.go index 0cd3ccc..74b934b 100644 --- a/string_slice.go +++ b/string_slice.go @@ -62,6 +62,20 @@ func (s *stringSliceValue) String() string { return "[" + str + "]" } +func (s *stringSliceValue) Append(val string) error { + *s.value = append(*s.value, val) + return nil +} + +func (s *stringSliceValue) Replace(val []string) error { + *s.value = val + return nil +} + +func (s *stringSliceValue) GetSlice() []string { + return *s.value +} + func stringSliceConv(sval string) (interface{}, error) { sval = sval[1 : len(sval)-1] // An empty string would cause a slice with one (empty) string |
