aboutsummaryrefslogtreecommitdiff
path: root/string_slice.go
diff options
context:
space:
mode:
Diffstat (limited to 'string_slice.go')
-rw-r--r--string_slice.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/string_slice.go b/string_slice.go
index b816ca8..3cb2e69 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