Fix golint failures on handlers/negotiation
DefaultEndpointRestrictions is only used in the module, so this renames it to defaultEndpointRestrictions. Kubernetes-commit: 302ec9859113f322a32ed03673865b32ca5a130a
This commit is contained in:
parent
b0d59d3ca3
commit
538ceee47b
|
@ -29,6 +29,7 @@ type errNotAcceptable struct {
|
|||
accepted []string
|
||||
}
|
||||
|
||||
// NewNotAcceptableError returns an error of NotAcceptable which contains specified string
|
||||
func NewNotAcceptableError(accepted []string) error {
|
||||
return errNotAcceptable{accepted}
|
||||
}
|
||||
|
@ -51,6 +52,7 @@ type errUnsupportedMediaType struct {
|
|||
accepted []string
|
||||
}
|
||||
|
||||
// NewUnsupportedMediaTypeError returns an error of UnsupportedMediaType which contains specified string
|
||||
func NewUnsupportedMediaTypeError(accepted []string) error {
|
||||
return errUnsupportedMediaType{accepted}
|
||||
}
|
||||
|
|
|
@ -133,6 +133,8 @@ type EndpointRestrictions interface {
|
|||
AllowsStreamSchema(schema string) bool
|
||||
}
|
||||
|
||||
// DefaultEndpointRestrictions is the default EndpointRestrictions which allows
|
||||
// content-type negotiation to verify server support for specific options
|
||||
var DefaultEndpointRestrictions = emptyEndpointRestrictions{}
|
||||
|
||||
type emptyEndpointRestrictions struct{}
|
||||
|
|
Loading…
Reference in New Issue