Closed
Description
🐛 Bug Report
Generated gateway code imports github.com/golang/protobuf/{descriptor,proto}
which is deprecated according to staticcheck
. We're stuck for now on v1.14.5, but afaics there's no fix in newer versions either?
To Reproduce
Run staticcheck
on generated gateway code which contains
// rpc/gateway/rpc.pb.gw.go
import (
"github.com/golang/protobuf/descriptor"
"github.com/golang/protobuf/proto"
)
Expected behavior
No output.
Actual Behavior
rpc/gateway/rpc.pb.gw.go:16:2: package github.com/golang/protobuf/descriptor is deprecated: See the "google.golang.org/protobuf/reflect/protoreflect" package for how to obtain an EnumDescriptor or MessageDescriptor in order to programatically interact with the protobuf type system. (SA1019)
rpc/gateway/rpc.pb.gw.go:17:2: package github.com/golang/protobuf/proto is deprecated: Use the "google.golang.org/protobuf/proto" package instead. (SA1019)
rpc/gateway/rpc.pb.gw.go:32:9: descriptor.ForMessage is deprecated: Not all concrete message types satisfy the Message interface. Use MessageDescriptorProto instead. If possible, the calling code should be rewritten to use protobuf reflection instead. See package "google.golang.org/protobuf/reflect/protoreflect" for details. (SA1019)
Your Environment
v1.14.5, Ubuntu 20.04.1 LTS
Metadata
Metadata
Assignees
Labels
No labels