parent
5633f4204d
commit
3adf07b442
|
@ -11,8 +11,7 @@ import (
|
||||||
var VERSION string
|
var VERSION string
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
var repos *forgepb.Repos
|
var repos forgepb.Repos
|
||||||
repos = new(forgepb.Repos)
|
|
||||||
if err := repos.ConfigLoad(); err != nil {
|
if err := repos.ConfigLoad(); err != nil {
|
||||||
log.Warn("forgepb.ConfigLoad() failed", err)
|
log.Warn("forgepb.ConfigLoad() failed", err)
|
||||||
os.Exit(-1)
|
os.Exit(-1)
|
||||||
|
|
14
human.go
14
human.go
|
@ -1,5 +1,7 @@
|
||||||
package forgepb
|
package forgepb
|
||||||
|
|
||||||
|
import "fmt"
|
||||||
|
|
||||||
// mostly just functions related to making STDOUT
|
// mostly just functions related to making STDOUT
|
||||||
// more readable by us humans
|
// more readable by us humans
|
||||||
|
|
||||||
|
@ -10,3 +12,15 @@ package forgepb
|
||||||
func RepoHeader() string {
|
func RepoHeader() string {
|
||||||
return "Name Path"
|
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)
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue