From c6c0f0fd30b9b96d1c9a1cbf90799706bd501458 Mon Sep 17 00:00:00 2001 From: therealmitchconnors Date: Fri, 16 Aug 2019 12:07:51 -0700 Subject: Add first SliceValue implementations --- string_slice.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'string_slice.go') 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 -- cgit v1.2.3