Fix running pods handler on nil lister
This follows suit with other hanlders and returns a NotImplemented http.HandlerFunc when the lister is nil. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
@@ -27,6 +27,10 @@ import (
|
||||
type PodListerFunc func(context.Context) ([]*v1.Pod, error)
|
||||
|
||||
func HandleRunningPods(getPods PodListerFunc) http.HandlerFunc {
|
||||
if getPods == nil {
|
||||
return NotImplemented
|
||||
}
|
||||
|
||||
scheme := runtime.NewScheme()
|
||||
v1.SchemeBuilder.AddToScheme(scheme) //nolint:errcheck
|
||||
codecs := serializer.NewCodecFactory(scheme)
|
||||
|
||||
Reference in New Issue
Block a user