diff --git a/documentation/examples/custom-sd/adapter/adapter.go b/documentation/examples/custom-sd/adapter/adapter.go index 39cfea289..048a7be34 100644 --- a/documentation/examples/custom-sd/adapter/adapter.go +++ b/documentation/examples/custom-sd/adapter/adapter.go @@ -18,14 +18,15 @@ import ( "context" "encoding/json" "fmt" - "github.com/go-kit/kit/log" - "github.com/go-kit/kit/log/level" - "github.com/prometheus/prometheus/discovery" - "github.com/prometheus/prometheus/discovery/targetgroup" "io/ioutil" "os" "path/filepath" "reflect" + + "github.com/go-kit/kit/log" + "github.com/go-kit/kit/log/level" + "github.com/prometheus/prometheus/discovery" + "github.com/prometheus/prometheus/discovery/targetgroup" ) type customSD struct { diff --git a/documentation/examples/custom-sd/adapter/adapter_test.go b/documentation/examples/custom-sd/adapter/adapter_test.go index 291f2e082..563e1c108 100644 --- a/documentation/examples/custom-sd/adapter/adapter_test.go +++ b/documentation/examples/custom-sd/adapter/adapter_test.go @@ -14,10 +14,11 @@ package adapter import ( - "github.com/prometheus/common/model" - "github.com/prometheus/prometheus/discovery/targetgroup" "reflect" "testing" + + "github.com/prometheus/common/model" + "github.com/prometheus/prometheus/discovery/targetgroup" ) // TestGenerateTargetGroups checks that the target is correctly generated. @@ -141,7 +142,7 @@ func TestGenerateTargetGroups(t *testing.T) { result := generateTargetGroups(testCase.targetGroup) if !reflect.DeepEqual(result, testCase.expectedCustomSD) { - t.Errorf("%v :\nresult produced %v\nmismatch the expected customSD: %v", + t.Errorf("%q failed\ngot: %#v\nexpected: %v", testCase.title, result, testCase.expectedCustomSD)