summaryrefslogtreecommitdiff
path: root/bar.go
diff options
context:
space:
mode:
Diffstat (limited to 'bar.go')
-rw-r--r--bar.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/bar.go b/bar.go
index 159de50..510d292 100644
--- a/bar.go
+++ b/bar.go
@@ -1,18 +1,22 @@
package main
-import "time"
+import "fmt"
// Bar is the struct that holds each of the modules and displays the data from them
type Bar struct {
- Modules []Module
- RefreshRate time.Duration
+ Modules []Module
}
func (b Bar) Display() string {
var val string
for _, mod := range b.Modules {
- s, _ := mod.GetInfo()
+ s, err := mod.GetInfo()
+
+ // TODO: Handle error differently
+ if err != nil {
+ fmt.Println(err)
+ }
val += "[" + s + "]"
}