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 <beorn@grafana.com>
This commit is contained in:
parent
c13325c862
commit
b8308329f0
|
@ -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",
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue