2024-11-20 12:11:13 -06:00
|
|
|
package forgepb
|
|
|
|
|
2024-11-21 10:37:01 -06:00
|
|
|
import "fmt"
|
|
|
|
|
2024-11-20 12:11:13 -06:00
|
|
|
// 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"
|
|
|
|
}
|
2024-11-21 10:37:01 -06:00
|
|
|
|
|
|
|
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)
|
|
|
|
}
|