Skip to content

protoc-gen-go: remove generated dependency on github.com/golang/protobuf #1077

Closed
@kevinburke1

Description

Staticcheck is a popular tool for vetting Go source code. For example, the golang.org/x/tools project includes it in the workflow for lsp.

Attempting to run staticcheck on generated .pb.go files yields the following error:

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

This makes it more difficult to use staticcheck as part of a workflow that includes generated proto files. Further, it's not clear that this situation can be resolved by end users; the generated files are going to import golang/protobuf for some time still.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions