Titanio Yudista
Titanio Yudista

Reputation: 247

Error module github.com/golang/protobuf is deprecated

I have a problem with the command line go get or go get . in my Golang project. The error is

go: module github.com/golang/protobuf is deprecated: Use the "google.golang.org/protobuf" module instead.

I have tried step by step install package protobuf in this website enter link description here

but I can't resolve my problem.

Upvotes: 6

Views: 12131

Answers (1)

TehSphinX
TehSphinX

Reputation: 7440

You can check your code if you import github.com/golang/protobuf somewhere.

If you don't use the import in your code, check which dependency imports it:

go mod graph | grep github.com/golang/protobuf

or

go mod why github.com/golang/protobuf

Basically you need to eliminate that import somehow either by removing it in your code, updating your dependencies or maybe even eliminate the dependency that hasn't updated to the new protobuf package yet. (Had to do that recently by kicking etcd which I used for election)

Upvotes: 4

Related Questions