diff --git a/Magefile.go b/Magefile.go index f23b1e1..8605df1 100644 --- a/Magefile.go +++ b/Magefile.go @@ -1,4 +1,5 @@ -//+build mage +//go:build mage +// +build mage package main @@ -15,3 +16,8 @@ func Hello() { // Default configures the default target. var Default = build.BuildAll + +var _ = build.SetBeforeBuildCallback(func(cfg build.Config) (build.Config, error) { + cfg.EnableCGo = true + return cfg, nil +}) diff --git a/go.mod b/go.mod index 2d618d2..74374a0 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/grafana/grafana-starter-datasource-backend +module github.com/exaco/grafana-kafka-datasource go 1.16 diff --git a/pkg/main.go b/pkg/main.go index a9afb11..ebeb26b 100644 --- a/pkg/main.go +++ b/pkg/main.go @@ -3,9 +3,9 @@ package main import ( "os" + "github.com/exaco/grafana-kafka-datasource/pkg/plugin" "github.com/grafana/grafana-plugin-sdk-go/backend/datasource" "github.com/grafana/grafana-plugin-sdk-go/backend/log" - "github.com/grafana/grafana-starter-datasource-backend/pkg/plugin" ) func main() { diff --git a/pkg/plugin/plugin.go b/pkg/plugin/plugin.go index e7cf9e1..f6f716d 100644 --- a/pkg/plugin/plugin.go +++ b/pkg/plugin/plugin.go @@ -14,7 +14,7 @@ import ( "github.com/grafana/grafana-plugin-sdk-go/data" "github.com/grafana/grafana-plugin-sdk-go/live" - "github.com/grafana/grafana-starter-datasource-backend/pkg/kafka_client" + "github.com/exaco/grafana-kafka-datasource/pkg/kafka_client" ) var ( diff --git a/pkg/plugin/plugin_test.go b/pkg/plugin/plugin_test.go index 616f541..abce001 100644 --- a/pkg/plugin/plugin_test.go +++ b/pkg/plugin/plugin_test.go @@ -4,8 +4,8 @@ import ( "context" "testing" + "github.com/exaco/grafana-kafka-datasource/pkg/plugin" "github.com/grafana/grafana-plugin-sdk-go/backend" - "github.com/grafana/grafana-starter-datasource-backend/pkg/plugin" ) func TestQueryData(t *testing.T) { @@ -19,7 +19,7 @@ func TestQueryData(t *testing.T) { }, }, ) - + if err != nil { t.Error(err) }