summaryrefslogtreecommitdiff
path: root/vendor/google.golang.org/grpc/encoding
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/google.golang.org/grpc/encoding')
-rw-r--r--vendor/google.golang.org/grpc/encoding/encoding.go4
-rw-r--r--vendor/google.golang.org/grpc/encoding/gzip/gzip.go4
-rw-r--r--vendor/google.golang.org/grpc/encoding/proto/proto.go4
3 files changed, 6 insertions, 6 deletions
diff --git a/vendor/google.golang.org/grpc/encoding/encoding.go b/vendor/google.golang.org/grpc/encoding/encoding.go
index 07a586135..69d5580b6 100644
--- a/vendor/google.golang.org/grpc/encoding/encoding.go
+++ b/vendor/google.golang.org/grpc/encoding/encoding.go
@@ -90,9 +90,9 @@ func GetCompressor(name string) Compressor {
// methods can be called from concurrent goroutines.
type Codec interface {
// Marshal returns the wire format of v.
- Marshal(v interface{}) ([]byte, error)
+ Marshal(v any) ([]byte, error)
// Unmarshal parses the wire format into v.
- Unmarshal(data []byte, v interface{}) error
+ Unmarshal(data []byte, v any) error
// Name returns the name of the Codec implementation. The returned string
// will be used as part of content type in transmission. The result must be
// static; the result cannot change between calls.
diff --git a/vendor/google.golang.org/grpc/encoding/gzip/gzip.go b/vendor/google.golang.org/grpc/encoding/gzip/gzip.go
index a3bb173c2..6306e8bb0 100644
--- a/vendor/google.golang.org/grpc/encoding/gzip/gzip.go
+++ b/vendor/google.golang.org/grpc/encoding/gzip/gzip.go
@@ -40,7 +40,7 @@ const Name = "gzip"
func init() {
c := &compressor{}
- c.poolCompressor.New = func() interface{} {
+ c.poolCompressor.New = func() any {
return &writer{Writer: gzip.NewWriter(io.Discard), pool: &c.poolCompressor}
}
encoding.RegisterCompressor(c)
@@ -61,7 +61,7 @@ func SetLevel(level int) error {
return fmt.Errorf("grpc: invalid gzip compression level: %d", level)
}
c := encoding.GetCompressor(Name).(*compressor)
- c.poolCompressor.New = func() interface{} {
+ c.poolCompressor.New = func() any {
w, err := gzip.NewWriterLevel(io.Discard, level)
if err != nil {
panic(err)
diff --git a/vendor/google.golang.org/grpc/encoding/proto/proto.go b/vendor/google.golang.org/grpc/encoding/proto/proto.go
index 3009b35af..0ee3d3bae 100644
--- a/vendor/google.golang.org/grpc/encoding/proto/proto.go
+++ b/vendor/google.golang.org/grpc/encoding/proto/proto.go
@@ -37,7 +37,7 @@ func init() {
// codec is a Codec implementation with protobuf. It is the default codec for gRPC.
type codec struct{}
-func (codec) Marshal(v interface{}) ([]byte, error) {
+func (codec) Marshal(v any) ([]byte, error) {
vv, ok := v.(proto.Message)
if !ok {
return nil, fmt.Errorf("failed to marshal, message is %T, want proto.Message", v)
@@ -45,7 +45,7 @@ func (codec) Marshal(v interface{}) ([]byte, error) {
return proto.Marshal(vv)
}
-func (codec) Unmarshal(data []byte, v interface{}) error {
+func (codec) Unmarshal(data []byte, v any) error {
vv, ok := v.(proto.Message)
if !ok {
return fmt.Errorf("failed to unmarshal, message is %T, want proto.Message", v)