string_array.go 279 B

123456789101112131415161718
  1. package app
  2. import (
  3. "strings"
  4. )
  5. type StringArray []string
  6. func (a *StringArray) Get() interface{} { return []string(*a) }
  7. func (a *StringArray) Set(s string) error {
  8. *a = append(*a, s)
  9. return nil
  10. }
  11. func (a *StringArray) String() string {
  12. return strings.Join(*a, ",")
  13. }