Commit c348cad0 authored by Your Name's avatar Your Name

connect prometh param

parent 8ad455a6
package main
import (
"flag"
"fmt"
"log"
......@@ -13,7 +14,16 @@ import (
func main() {
//ExampleAPI_query()
cli, err := NewProCli("http://192.168.1.21:9090")
promethAddr := flag.String("promethaddr", "http://127.0.0.1:9090", "a string parameter")
flag.Parse()
//cli, err := NewProCli("http://192.168.1.21:9090")
fmt.Println("connect to prometh addr-----------", *promethAddr)
//cli, err := NewProCli("http://192.168.1.21:9090")
cli, err := NewProCli(*promethAddr)
if err != nil {
fmt.Println(err.Error())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment