blob: 322e6c2fc8df5b67a56631d8a0eda2ca004d32e3 (
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
|
package forgepb
import "fmt"
// mostly just functions related to making STDOUT
// more readable by us humans
// also function shortcuts the do fixed limited formatting (it's like COBOL)
// so reporting tables of the status of what droplets and hypervisors
// are in text columns and rows that can be easily read in a terminal
func RepoHeader() string {
return "Name Path"
}
func (all *Repos) StandardHeader() string {
return fmt.Sprintf("%-4s %40s %s", "r/w", "Path", "flags")
}
func (r *Repo) StandardHeader() string {
var flags string
if r.Private {
flags += "(private) "
}
return fmt.Sprintf("%-4s %40s %s", "true", r.GoPath, flags)
}
|