Implement Getter interface for StringArray (#104)
This commit fix the issue #98
This commit is contained in:
parent
8cc5fbf859
commit
a656435d00
@ -7,6 +7,11 @@ import (
|
|||||||
// StringArray is a type alias for a slice of strings
|
// StringArray is a type alias for a slice of strings
|
||||||
type StringArray []string
|
type StringArray []string
|
||||||
|
|
||||||
|
// Get returns the slice of strings
|
||||||
|
func (a *StringArray) Get() interface{} {
|
||||||
|
return []string(*a)
|
||||||
|
}
|
||||||
|
|
||||||
// Set appends a string to the StringArray
|
// Set appends a string to the StringArray
|
||||||
func (a *StringArray) Set(s string) error {
|
func (a *StringArray) Set(s string) error {
|
||||||
*a = append(*a, s)
|
*a = append(*a, s)
|
||||||
|
Loading…
Reference in New Issue
Block a user