summaryrefslogtreecommitdiff
path: root/human.go
diff options
context:
space:
mode:
Diffstat (limited to 'human.go')
-rw-r--r--human.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/human.go b/human.go
index 479c6d6..322e6c2 100644
--- a/human.go
+++ b/human.go
@@ -1,5 +1,7 @@
package forgepb
+import "fmt"
+
// mostly just functions related to making STDOUT
// more readable by us humans
@@ -10,3 +12,15 @@ package forgepb
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)
+}