code check modify:

receiver name obj should be consistent with previous receiver name s for SimpleStream
error var hookNotFinished should have name of the form errFoo
This commit is contained in:
twilight0620 2022-04-21 16:47:22 +08:00
parent f173d01c01
commit ae385ee874
2 changed files with 4 additions and 4 deletions

View File

@ -405,8 +405,8 @@ func (s *SimpleStream) Close() error {
return nil
}
func (obj *SimpleStream) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind }
func (obj *SimpleStream) DeepCopyObject() runtime.Object {
func (s *SimpleStream) GetObjectKind() schema.ObjectKind { return schema.EmptyObjectKind }
func (s *SimpleStream) DeepCopyObject() runtime.Object {
panic("SimpleStream does not support DeepCopy")
}

View File

@ -232,13 +232,13 @@ func (h postStartHookHealthz) Name() string {
return h.name
}
var hookNotFinished = errors.New("not finished")
var errHookNotFinished = errors.New("not finished")
func (h postStartHookHealthz) Check(req *http.Request) error {
select {
case <-h.done:
return nil
default:
return hookNotFinished
return errHookNotFinished
}
}