summaryrefslogtreecommitdiff
path: root/bar.go
blob: a2a9d3cc28664dfdc404594bcb4455aac586391d (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
25
26
27
package main

import (
	"fmt"
	"github.com/HelixBePraised/jasbr/modules"
)

// Bar is the struct that holds each of the modules and displays the data from them
type Bar struct {
	Modules []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
}