mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Remove a stray Log() statement from MultiSourceWidget
This commit is contained in:
parent
4c2b52cdbb
commit
52023a4db0
@ -1,11 +1,10 @@
|
|||||||
package wtf
|
package wtf
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"github.com/wtfutil/wtf/cfg"
|
"github.com/wtfutil/wtf/cfg"
|
||||||
"github.com/wtfutil/wtf/logger"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// MultiSourceWidget is a widget that supports displaying data from multiple sources
|
||||||
type MultiSourceWidget struct {
|
type MultiSourceWidget struct {
|
||||||
moduleConfig *cfg.Common
|
moduleConfig *cfg.Common
|
||||||
singular string
|
singular string
|
||||||
@ -26,8 +25,6 @@ func NewMultiSourceWidget(moduleConfig *cfg.Common, singular, plural string) Mul
|
|||||||
|
|
||||||
widget.loadSources()
|
widget.loadSources()
|
||||||
|
|
||||||
logger.Log(fmt.Sprintf("%+v", widget.Sources))
|
|
||||||
|
|
||||||
return widget
|
return widget
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -42,7 +39,7 @@ func (widget *MultiSourceWidget) CurrentSource() string {
|
|||||||
return widget.Sources[widget.Idx]
|
return widget.Sources[widget.Idx]
|
||||||
}
|
}
|
||||||
|
|
||||||
// Next displays the next source in the source list. If the current source is the last
|
// NextSource displays the next source in the source list. If the current source is the last
|
||||||
// source it wraps around to the first source
|
// source it wraps around to the first source
|
||||||
func (widget *MultiSourceWidget) NextSource() {
|
func (widget *MultiSourceWidget) NextSource() {
|
||||||
widget.Idx++
|
widget.Idx++
|
||||||
@ -55,7 +52,7 @@ func (widget *MultiSourceWidget) NextSource() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prev displays the previous source in the source list. If the current source is the first
|
// PrevSource displays the previous source in the source list. If the current source is the first
|
||||||
// source, it wraps around to the last source
|
// source, it wraps around to the last source
|
||||||
func (widget *MultiSourceWidget) PrevSource() {
|
func (widget *MultiSourceWidget) PrevSource() {
|
||||||
widget.Idx--
|
widget.Idx--
|
||||||
|
Loading…
x
Reference in New Issue
Block a user