Merge pull request #73094 from oomichi/fix-golint-negociate

Fix golint failures on handlers/negotiation

Kubernetes-commit: 61b676aae1e80673251fbbad3712d0e722b11f0d
This commit is contained in:
Kubernetes Publisher 2019-02-20 15:20:48 -08:00
commit 8a41519758
3 changed files with 37 additions and 33 deletions

66
Godeps/Godeps.json generated
View File

@ -928,135 +928,135 @@
},
{
"ImportPath": "k8s.io/api/admission/v1beta1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/admissionregistration/v1beta1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/apps/v1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/apps/v1beta1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/apps/v1beta2",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/auditregistration/v1alpha1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/authentication/v1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/authentication/v1beta1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/authorization/v1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/authorization/v1beta1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/autoscaling/v1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/autoscaling/v2beta1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/autoscaling/v2beta2",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/batch/v1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/batch/v1beta1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/batch/v2alpha1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/certificates/v1beta1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/coordination/v1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/coordination/v1beta1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/core/v1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/events/v1beta1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/extensions/v1beta1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/networking/v1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/policy/v1beta1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/rbac/v1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/rbac/v1alpha1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/rbac/v1beta1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/scheduling/v1alpha1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/scheduling/v1beta1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/settings/v1alpha1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/storage/v1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/storage/v1alpha1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/api/storage/v1beta1",
"Rev": "19a86857bdf5768b68448d16eb34a8fc08002ae3"
"Rev": "7644c54216e9135f91f6cb3c026a5705f60fdaaf"
},
{
"ImportPath": "k8s.io/apimachinery/pkg/api/apitesting",

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