Fix linter exemptions in golint
We were having issues with golint not properly reporting declaration of functions without proper documentation (comments). This is due to a config with golangci. See: https://github.com/golangci/golangci-lint/issues/456
This commit is contained in:
@@ -49,9 +49,6 @@ type TermSize struct {
|
||||
Height uint16
|
||||
}
|
||||
|
||||
// HandleContainerExec makes an http handler func from a Provider which execs a command in a pod's container
|
||||
// Note that this handler currently depends on gorrilla/mux to get url parts as variables.
|
||||
// TODO(@cpuguy83): don't force gorilla/mux on consumers of this function
|
||||
// ContainerExecHandlerConfig is used to pass options to options to the container exec handler.
|
||||
type ContainerExecHandlerConfig struct {
|
||||
// StreamIdleTimeout is the maximum time a streaming connection
|
||||
@@ -72,7 +69,7 @@ func WithExecStreamIdleTimeout(dur time.Duration) ContainerExecHandlerOption {
|
||||
}
|
||||
}
|
||||
|
||||
// WithExecStreamIdleTimeout sets the idle timeout for a container exec stream
|
||||
// WithExecStreamCreationTimeout sets the creation timeout for a container exec stream
|
||||
func WithExecStreamCreationTimeout(dur time.Duration) ContainerExecHandlerOption {
|
||||
return func(cfg *ContainerExecHandlerConfig) {
|
||||
cfg.StreamCreationTimeout = dur
|
||||
|
||||
@@ -24,9 +24,9 @@ import (
|
||||
"k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
)
|
||||
|
||||
type PodListerFunc func(context.Context) ([]*v1.Pod, error)
|
||||
type PodListerFunc func(context.Context) ([]*v1.Pod, error) // nolint:golint
|
||||
|
||||
func HandleRunningPods(getPods PodListerFunc) http.HandlerFunc {
|
||||
func HandleRunningPods(getPods PodListerFunc) http.HandlerFunc { // nolint:golint
|
||||
if getPods == nil {
|
||||
return NotImplemented
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ type ServeMux interface {
|
||||
Handle(path string, h http.Handler)
|
||||
}
|
||||
|
||||
type PodHandlerConfig struct {
|
||||
type PodHandlerConfig struct { // nolint:golint
|
||||
RunInContainer ContainerExecHandlerFunc
|
||||
GetContainerLogs ContainerLogsHandlerFunc
|
||||
// GetPods is meant to enumerate the pods that the provider knows about
|
||||
|
||||
Reference in New Issue
Block a user