e2e.test --help
This commit is contained in:
		@@ -38,12 +38,16 @@ var _ goflag.Value = &StringSlice{}
 | 
			
		||||
var _ pflag.Value = &StringSlice{}
 | 
			
		||||
 | 
			
		||||
func (s *StringSlice) String() string {
 | 
			
		||||
	if s == nil || s.value == nil {
 | 
			
		||||
		return ""
 | 
			
		||||
	}
 | 
			
		||||
	return strings.Join(*s.value, " ")
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (s *StringSlice) Set(val string) error {
 | 
			
		||||
	if s.value == nil || !s.changed {
 | 
			
		||||
		*s.value = make([]string, 0)
 | 
			
		||||
		v := make([]string, 0)
 | 
			
		||||
		s.value = &v
 | 
			
		||||
	}
 | 
			
		||||
	*s.value = append(*s.value, val)
 | 
			
		||||
	s.changed = true
 | 
			
		||||
 
 | 
			
		||||
@@ -83,8 +83,8 @@ func TestStringSlice(t *testing.T) {
 | 
			
		||||
		} else if err != nil {
 | 
			
		||||
			t.Errorf("%d: expected nil error, got %v", i, err)
 | 
			
		||||
		}
 | 
			
		||||
		if !reflect.DeepEqual(s, test.expected) {
 | 
			
		||||
			t.Errorf("%d: expected %+v, got %+v", i, test.expected, s)
 | 
			
		||||
		if !reflect.DeepEqual(*v.value, test.expected) {
 | 
			
		||||
			t.Errorf("%d: expected %+v, got %+v", i, test.expected, *v.value)
 | 
			
		||||
		}
 | 
			
		||||
		if v.changed != test.changed {
 | 
			
		||||
			t.Errorf("%d: expected %t got %t", i, test.changed, v.changed)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user