From b8308329f085fe7729286cb1ad7a8af7ad022c25 Mon Sep 17 00:00:00 2001 From: beorn7 Date: Tue, 15 Oct 2019 13:43:53 +0200 Subject: [PATCH] Fix function names in API examples The part after the underscore has to be lowercase. Otherwise, it is seen as the name of a Go type, which doesn't exist, which will result in the example not showing up in godoc. Signed-off-by: beorn7 --- api/prometheus/v1/example_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/api/prometheus/v1/example_test.go b/api/prometheus/v1/example_test.go index 6d689fb..f981304 100644 --- a/api/prometheus/v1/example_test.go +++ b/api/prometheus/v1/example_test.go @@ -25,7 +25,7 @@ import ( v1 "github.com/prometheus/client_golang/api/prometheus/v1" ) -func ExampleAPI_Query() { +func ExampleAPI_query() { client, err := api.NewClient(api.Config{ Address: "http://demo.robustperception.io:9090", }) @@ -48,7 +48,7 @@ func ExampleAPI_Query() { fmt.Printf("Result:\n%v\n", result) } -func ExampleAPI_QueryRange() { +func ExampleAPI_queryRange() { client, err := api.NewClient(api.Config{ Address: "http://demo.robustperception.io:9090", }) @@ -76,7 +76,7 @@ func ExampleAPI_QueryRange() { fmt.Printf("Result:\n%v\n", result) } -func ExampleAPI_Series() { +func ExampleAPI_series() { client, err := api.NewClient(api.Config{ Address: "http://demo.robustperception.io:9090", })