Fix CRD validation error for 'items' field

Signed-off-by: He Xiaoxi <xxhe@alauda.io>
This commit is contained in:
He Xiaoxi
2019-06-26 15:30:49 +08:00
parent 879f289ed7
commit 2e37a3bebe
108 changed files with 2356 additions and 1176 deletions

View File

@@ -121,7 +121,7 @@ func ParseDuration(cand string) (time.Duration, error) {
if ok {
return dur, nil
}
return 0, fmt.Errorf("Unable to parse %s as duration", cand)
return 0, fmt.Errorf("unable to parse %s as duration", cand)
}
// Scan reads a Duration value from database driver type.
@@ -201,3 +201,18 @@ func (d *Duration) SetBSON(raw bson.Raw) error {
return errors.New("couldn't unmarshal bson raw value as Duration")
}
// DeepCopyInto copies the receiver and writes its value into out.
func (d *Duration) DeepCopyInto(out *Duration) {
*out = *d
}
// DeepCopy copies the receiver into a new Duration.
func (d *Duration) DeepCopy() *Duration {
if d == nil {
return nil
}
out := new(Duration)
d.DeepCopyInto(out)
return out
}