Merge pull request #96331 from mithuns/fix-lint-runtime-serializer-protobuf

Fix go lint on folder apimachinery/pkg/runtime/serializer/protobuf
This commit is contained in:
Kubernetes Prow Robot 2020-11-12 05:32:49 -08:00 committed by GitHub
commit d1c41e70ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -254,7 +254,6 @@ staging/src/k8s.io/apimachinery/pkg/conversion
staging/src/k8s.io/apimachinery/pkg/runtime
staging/src/k8s.io/apimachinery/pkg/runtime/schema
staging/src/k8s.io/apimachinery/pkg/runtime/serializer
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/protobuf
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/recognizer
staging/src/k8s.io/apimachinery/pkg/runtime/serializer/streaming
staging/src/k8s.io/apimachinery/pkg/runtime/testing

View File

@ -61,6 +61,7 @@ func (e errNotMarshalable) Status() metav1.Status {
}
}
// IsNotMarshalable checks the type of error, returns a boolean true if error is not nil and not marshalable false otherwise
func IsNotMarshalable(err error) bool {
_, ok := err.(errNotMarshalable)
return err != nil && ok
@ -77,6 +78,7 @@ func NewSerializer(creater runtime.ObjectCreater, typer runtime.ObjectTyper) *Se
}
}
// Serializer handles encoding versioned objects into the proper wire form
type Serializer struct {
prefix []byte
creater runtime.ObjectCreater
@ -457,8 +459,10 @@ func (s *RawSerializer) Identifier() runtime.Identifier {
return rawSerializerIdentifier
}
// LengthDelimitedFramer is exported variable of type lengthDelimitedFramer
var LengthDelimitedFramer = lengthDelimitedFramer{}
// Provides length delimited frame reader and writer methods
type lengthDelimitedFramer struct{}
// NewFrameWriter implements stream framing for this serializer