Open hoptical opened 2 years ago
I think you need to:
var _ = build.SetBeforeBuildCallback(func(cfg build.Config) (build.Config, error) {
cfg.EnableCGo = true
return cfg, nil
})
Also looks like the kafka package isn't supported on Windows, so you might have some trouble building the Windows binary.
@marcusolsson Thanks for your answer. Yes, It worked after your suggested modifications. So according to this link, we've below considerations with confluent-kafka-go package:
-tags dynamic
. Which I guess it's not applicable with the mage command and we've to use go build -tags dynamic -o dist/gpx_kafka-datasource_linux_amd64 ./pkg
However, in future, we'll consider changing to other packages such as kafka-go or goka.
Running mage command faces bellow error:
But its ok with the direct
go build
command and Grafana works with it successfully:go build -o dist/gpx_kafka-datasource_linux_amd64 ./pkg