解决panic: proto: duplicate enum registered: raftpb.EntryType

解决panic: proto: duplicate enum registered: raftpb.EntryType,第1张

 报错信息:

A future release will panic on registration conflicts. See:
https://developers.google.com/protocol-buffers/docs/reference/go/faq#namespace-conflict

panic: proto: duplicate enum registered: raftpb.EntryType

goroutine 1 [running]:
github.com/golang/protobuf/proto.RegisterEnum(0x2461722, 0x10, 0xc0002b29f0, 0xc0002b2a20)
	/user/local/gopath/pkg/mod/github.com/golang/[email protected]/proto/registry.go:104 +0x11f
github.com/coreos/etcd/raft/raftpb.init.0()
	/user/local/gopath/pkg/mod/github.com/coreos/[email protected]+incompatible/raft/raftpb/raft.pb.go:508 +0x52
make: *** [show] 错误 2

解决方法:go.mod中添加

replace go.etcd.io/etcd => github.com/coreos/etcd v3.3.10+incompatible

 

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/996408.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-21
下一篇 2022-05-21

发表评论

登录后才能评论

评论列表(0条)

保存