mirror of
https://github.com/strongdm/comply
synced 2025-12-17 19:53:58 +00:00
chore: migrate to go modules
This commit is contained in:
22
vendor/github.com/containous/go-bindata/go-bindata/AppendSliceValue.go
generated
vendored
Normal file
22
vendor/github.com/containous/go-bindata/go-bindata/AppendSliceValue.go
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
package main
|
||||
|
||||
import "strings"
|
||||
|
||||
// borrowed from https://github.com/hashicorp/serf/blob/master/command/agent/flag_slice_value.go
|
||||
|
||||
// AppendSliceValue implements the flag.Value interface and allows multiple
|
||||
// calls to the same variable to append a list.
|
||||
type AppendSliceValue []string
|
||||
|
||||
func (s *AppendSliceValue) String() string {
|
||||
return strings.Join(*s, ",")
|
||||
}
|
||||
|
||||
func (s *AppendSliceValue) Set(value string) error {
|
||||
if *s == nil {
|
||||
*s = make([]string, 0, 1)
|
||||
}
|
||||
|
||||
*s = append(*s, value)
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user