how to force go grpc plugin to use new import google.golang.org/protobuf/proto in generated pb.go file

16 views
Skip to first unread message

Serguei Bezverkhi

unread,
May 11, 2020, 10:52:17 AM5/11/20
to Protocol Buffers
Hello,

When blah.proto file gets converted into blah.pb.go it automatically adds import statement for: github.com/golang/protobuf/proto

that generates en error in the staticheck:

blah.pb.go:8:2: package github.com/golang/protobuf/proto is deprecated: Use the "google.golang.org/protobuf/proto" package instead. (SA1019)

I was wondering if there is a way to force go plugin to import a new package.

Thank you
Serguei


Sumit Agrawal

unread,
May 12, 2020, 4:17:53 AM5/12/20
to Protocol Buffers
Try updating protoc-gen-go version to latest.
Reply all
Reply to author
Forward
0 new messages