Skip to content

Commit b830832

Browse files
committed
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 <[email protected]>
1 parent c13325c commit b830832

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

api/prometheus/v1/example_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
v1 "github.com/prometheus/client_golang/api/prometheus/v1"
2626
)
2727

28-
func ExampleAPI_Query() {
28+
func ExampleAPI_query() {
2929
client, err := api.NewClient(api.Config{
3030
Address: "http://demo.robustperception.io:9090",
3131
})
@@ -48,7 +48,7 @@ func ExampleAPI_Query() {
4848
fmt.Printf("Result:\n%v\n", result)
4949
}
5050

51-
func ExampleAPI_QueryRange() {
51+
func ExampleAPI_queryRange() {
5252
client, err := api.NewClient(api.Config{
5353
Address: "http://demo.robustperception.io:9090",
5454
})
@@ -76,7 +76,7 @@ func ExampleAPI_QueryRange() {
7676
fmt.Printf("Result:\n%v\n", result)
7777
}
7878

79-
func ExampleAPI_Series() {
79+
func ExampleAPI_series() {
8080
client, err := api.NewClient(api.Config{
8181
Address: "http://demo.robustperception.io:9090",
8282
})

0 commit comments

Comments
 (0)