mirror of https://github.com/divan/expvarmon.git
Fixed dummy ui
This commit is contained in:
parent
f5ddaf06de
commit
0386b057cf
11
ui_dummy.go
11
ui_dummy.go
|
@ -2,6 +2,7 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DummyUI is an simple console UI mockup, for testing purposes.
|
// DummyUI is an simple console UI mockup, for testing purposes.
|
||||||
|
@ -18,6 +19,7 @@ func (*DummyUI) Update(data UIData) {
|
||||||
if data.Services == nil {
|
if data.Services == nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
fmt.Println(time.Now().Format("15:04:05 02/01"))
|
||||||
for _, service := range data.Services {
|
for _, service := range data.Services {
|
||||||
fmt.Printf("%s: ", service.Name)
|
fmt.Printf("%s: ", service.Name)
|
||||||
if service.Err != nil {
|
if service.Err != nil {
|
||||||
|
@ -25,11 +27,10 @@ func (*DummyUI) Update(data UIData) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
for _, name := range data.Vars {
|
||||||
if service.Goroutines != 0 {
|
fmt.Printf("%s: %v, ", name.Short(), service.Value(name))
|
||||||
fmt.Printf("goroutines: %d", service.Goroutines)
|
}
|
||||||
}
|
|
||||||
*/
|
|
||||||
fmt.Printf("\n")
|
fmt.Printf("\n")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue