cqcqs / go-kafka-demo

在go中简单使用kafka
1 stars 0 forks source link

编译不通过 #1

Open zouyaowen opened 1 year ago

zouyaowen commented 1 year ago
image

代码编译不起来

github.com/bsm/sarama-cluster

../../../../pkg/mod/github.com/bsm/sarama-cluster@v2.1.15+incompatible/consumer.go:238:16: not enough arguments in call to req.AddBlock have (string, int32, int64, number, string) want (string, int32, int64, int32, int64, string)

image
zouyaowen commented 1 year ago
image

代码编译不起来 # github.com/bsm/sarama-cluster ../../../../pkg/mod/github.com/bsm/sarama-cluster@v2.1.15+incompatible/consumer.go:238:16: not enough arguments in call to req.AddBlock have (string, int32, int64, number, string) want (string, int32, int64, int32, int64, string)

image

我知道为啥了,cluser那个仓库废弃了,只使用sarama库就行了

houchaowei commented 1 month ago
image

代码编译不起来 # github.com/bsm/sarama-cluster ../../../../pkg/mod/github.com/bsm/sarama-cluster@v2.1.15+incompatible/consumer.go:238:16: not enough arguments in call to req.AddBlock have (string, int32, int64, number, string) want (string, int32, int64, int32, int64, string)

image

我知道为啥了,cluser那个仓库废弃了,只使用sarama库就行了

这个是怎么只使用 sarama 呢?go mod tidy 的时候会自动又加上这个库了