1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00

updated with suggestions from @senorprogrammer

This commit is contained in:
Bill
2018-06-06 11:31:52 -07:00
parent 56158d2e93
commit 540dee04d7
3 changed files with 18 additions and 17 deletions

View File

@@ -17,7 +17,7 @@ var ok = true
// Widget define wtf widget to register widget later
type Widget struct {
wtf.GraphWidget
wtf.BarGraph
// time interval for send http request
updateInterval int
@@ -26,7 +26,7 @@ type Widget struct {
// NewWidget Make new instance of widget
func NewWidget() *Widget {
widget := Widget{
GraphWidget: wtf.NewGraphWidget(" Bar Graph", "bargraph", false),
BarGraph: wtf.NewBarGraph(" Bar Graph", "bargraph", false),
}
widget.View.SetWrap(true)
@@ -51,7 +51,7 @@ func MakeGraph(widget *Widget) {
}
widget.GraphWidget.BuildBars(20, "🌟", stats[:])
widget.BarGraph.BuildBars(20, "🌟", stats[:])
}