Skip to content

Commit

Permalink
Implement Getter interface for StringArray (oauth2-proxy#104)
Browse files Browse the repository at this point in the history
This commit fix the issue oauth2-proxy#98
  • Loading branch information
Berjou authored and JoelSpeed committed Mar 20, 2019
1 parent 8cc5fbf commit a656435
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions string_array.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ import (
// StringArray is a type alias for a slice of strings
type StringArray []string

// Get returns the slice of strings
func (a *StringArray) Get() interface{} {
return []string(*a)
}

// Set appends a string to the StringArray
func (a *StringArray) Set(s string) error {
*a = append(*a, s)
Expand Down

0 comments on commit a656435

Please sign in to comment.