summaryrefslogtreecommitdiff
path: root/human.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2024-11-21 10:37:01 -0600
committerJeff Carr <[email protected]>2024-11-21 10:37:01 -0600
commit3adf07b442c62bd70e7bf37d4c07e51464b25e09 (patch)
tree3c8de211fa0f245e8013d7997d3d782d11f97c3b /human.go
parent5633f4204d6bfbce643f1fc6f74f988446c2b8c0 (diff)
hmmm
Signed-off-by: Jeff Carr <[email protected]>
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)
+}