upgrade to use testfixtures v3 (#11904)

* upgrade to use testfixtures v3

* simplify logic

* make vendor

* update per @lunny

* Update templates/repo/empty.tmpl

* Update templates/repo/empty.tmpl

Co-authored-by: Lauris BH <lauris@nix.lv>
This commit is contained in:
techknowlogick 2020-06-17 15:07:58 -04:00 committed by GitHub
parent 1645d4a5d8
commit 9e6a79bea9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
97 changed files with 8814 additions and 5464 deletions

View file

@ -23,6 +23,32 @@ func (s *stringArrayValue) Set(val string) error {
return nil
}
func (s *stringArrayValue) Append(val string) error {
*s.value = append(*s.value, val)
return nil
}
func (s *stringArrayValue) Replace(val []string) error {
out := make([]string, len(val))
for i, d := range val {
var err error
out[i] = d
if err != nil {
return err
}
}
*s.value = out
return nil
}
func (s *stringArrayValue) GetSlice() []string {
out := make([]string, len(*s.value))
for i, d := range *s.value {
out[i] = d
}
return out
}
func (s *stringArrayValue) Type() string {
return "stringArray"
}