|
|
@ -118,7 +118,7 @@ func (a *App) ActionPrint(_ *cli.Context) error {
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
return err
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fmt.Print(a.Out, node.Stringify())
|
|
|
|
fmt.Fprint(a.Out, node.Stringify())
|
|
|
|
return nil
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -126,7 +126,7 @@ func (a *App) ActionPrint(_ *cli.Context) error {
|
|
|
|
func (a *App) ActionMetrics(ctx *cli.Context) error {
|
|
|
|
func (a *App) ActionMetrics(ctx *cli.Context) error {
|
|
|
|
addr := ctx.String("http")
|
|
|
|
addr := ctx.String("http")
|
|
|
|
http.HandleFunc("/metrics", a.HandleMetrics)
|
|
|
|
http.HandleFunc("/metrics", a.HandleMetrics)
|
|
|
|
log.Println(a.Out, "listen on: "+addr)
|
|
|
|
log.Println("listen on: " + addr)
|
|
|
|
return http.ListenAndServe(addr, nil)
|
|
|
|
return http.ListenAndServe(addr, nil)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|