mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2024-11-30 09:16:52 +02:00
a656435d00
This commit fix the issue #98
25 lines
495 B
Go
25 lines
495 B
Go
package main
|
|
|
|
import (
|
|
"strings"
|
|
)
|
|
|
|
// 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)
|
|
return nil
|
|
}
|
|
|
|
// String joins elements of the StringArray into a single comma separated string
|
|
func (a *StringArray) String() string {
|
|
return strings.Join(*a, ",")
|
|
}
|