streamnative/pulsar-beat-output

编译报错

chenfuqiao opened this issue · 1 comments

按照README.md操作,在主目录$GOPATH/src/github.com/streamnative/编辑了一个main.go文件,然后执行go build -o filebeat main.go,报错:

go: downloading github.com/go-logr/logr v0.2.0
go: downloading github.com/Azure/go-autorest/autorest/date v0.2.0
go: downloading github.com/jpillora/backoff v1.0.0
go: downloading github.com/urso/go-bin v0.0.0-20180220135811-781c575c9f0e
go: downloading github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7
go: downloading github.com/hashicorp/golang-lru v0.5.2-0.20190520140433-59383c442f7d
go: downloading github.com/Azure/go-autorest/autorest/validation v0.2.0
#github.com/elastic/beats/libbeat/common/kubernetes
/root/go/pkg/mod/github.com/elastic/beats@v7.6.2+incompatible/libbeat/common/kubernetes/informer.go:53:18: not enough arguments in call to p.List
have ("k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions)
want (context.Context, "k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions)
/root/go/pkg/mod/github.com/elastic/beats@v7.6.2+incompatible/libbeat/common/kubernetes/informer.go:57:19: not enough arguments in call to p.Watch
have ("k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions)
want (context.Context, "k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions)
/root/go/pkg/mod/github.com/elastic/beats@v7.6.2+incompatible/libbeat/common/kubernetes/informer.go:66:18: not enough arguments in call to e.List
have ("k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions)
want (context.Context, "k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions)
/root/go/pkg/mod/github.com/elastic/beats@v7.6.2+incompatible/libbeat/common/kubernetes/informer.go:69:19: not enough arguments in call to e.Watch
have ("k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions)
want (context.Context, "k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions)
/root/go/pkg/mod/github.com/elastic/beats@v7.6.2+incompatible/libbeat/common/kubernetes/informer.go:79:18: not enough arguments in call to n.List
have ("k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions)
want (context.Context, "k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions)
/root/go/pkg/mod/github.com/elastic/beats@v7.6.2+incompatible/libbeat/common/kubernetes/informer.go:83:19: not enough arguments in call to n.Watch
have ("k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions)
want (context.Context, "k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions)
/root/go/pkg/mod/github.com/elastic/beats@v7.6.2+incompatible/libbeat/common/kubernetes/informer.go:93:19: not enough arguments in call to ns.List
have ("k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions)
want (context.Context, "k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions)
/root/go/pkg/mod/github.com/elastic/beats@v7.6.2+incompatible/libbeat/common/kubernetes/informer.go:97:20: not enough arguments in call to ns.Watch
have ("k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions)
want (context.Context, "k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions)
/root/go/pkg/mod/github.com/elastic/beats@v7.6.2+incompatible/libbeat/common/kubernetes/informer.go:106:18: not enough arguments in call to d.List
have ("k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions)
want (context.Context, "k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions)
/root/go/pkg/mod/github.com/elastic/beats@v7.6.2+incompatible/libbeat/common/kubernetes/informer.go:109:19: not enough arguments in call to d.Watch
have ("k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions)
want (context.Context, "k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions)
/root/go/pkg/mod/github.com/elastic/beats@v7.6.2+incompatible/libbeat/common/kubernetes/informer.go:109:19: too many errors

@chenfuqiao you can now build filebeat without edit any file. And we have compiled binary now.
I'll close this issue. If you have any other problem, feel free to reopen it.