summaryrefslogtreecommitdiff
path: root/bar.go
blob: 510d292013a611f88adfc65db0207e6c359d889d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package main

import "fmt"

// Bar is the struct that holds each of the modules and displays the data from them
type Bar struct {
	Modules []Module
}

func (b Bar) Display() string {
	var val string

	for _, mod := range b.Modules {
		s, err := mod.GetInfo()

		// TODO: Handle error differently
		if err != nil {
			fmt.Println(err)
		}
		val += "[" + s + "]"
	}

	return val
}