mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
remove redundant clause in string_slice_flag
This commit is contained in:
parent
abf6584322
commit
ab4918b6bc
@ -49,7 +49,7 @@ func (s *StringSlice) Set(val string) error {
|
|||||||
if s.value == nil {
|
if s.value == nil {
|
||||||
return fmt.Errorf("no target (nil pointer to []string)")
|
return fmt.Errorf("no target (nil pointer to []string)")
|
||||||
}
|
}
|
||||||
if *s.value == nil || !s.changed {
|
if !s.changed {
|
||||||
*s.value = make([]string, 0)
|
*s.value = make([]string, 0)
|
||||||
}
|
}
|
||||||
*s.value = append(*s.value, val)
|
*s.value = append(*s.value, val)
|
||||||
|
Loading…
Reference in New Issue
Block a user