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:
Kenichi Omichi 2019-01-18 22:06:48 +00:00 committed by Kubernetes Publisher
parent b0d59d3ca3
commit 538ceee47b
2 changed files with 4 additions and 0 deletions

View File

@ -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}
}

View File

@ -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{}