aboutsummaryrefslogtreecommitdiffstats
path: root/entity
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2023-01-14 20:02:52 +0100
committerMichael Muré <batolettre@gmail.com>2023-01-17 20:19:54 +0100
commit9fc8dbf4e167ae3d3a5fd602df74645e07d79679 (patch)
tree0372489d26994489fa3e7c29c069cac2094575e6 /entity
parente689cc506775ec1daccaae9ec35c7a28b48b2f05 (diff)
downloadgit-bug-9fc8dbf4e167ae3d3a5fd602df74645e07d79679.tar.gz
command: adapt the output of the bug list to the terminal size
Diffstat (limited to 'entity')
-rw-r--r--entity/id.go4
-rw-r--r--entity/id_interleaved.go2
2 files changed, 3 insertions, 3 deletions
diff --git a/entity/id.go b/entity/id.go
index 49398da8..0949bf92 100644
--- a/entity/id.go
+++ b/entity/id.go
@@ -11,7 +11,7 @@ import (
// sha-256
const idLength = 64
-const humanIdLength = 7
+const HumanIdLength = 7
const UnsetId = Id("unset")
@@ -34,7 +34,7 @@ func (i Id) String() string {
// Human return the identifier, shortened for human consumption
func (i Id) Human() string {
- format := fmt.Sprintf("%%.%ds", humanIdLength)
+ format := fmt.Sprintf("%%.%ds", HumanIdLength)
return fmt.Sprintf(format, i)
}
diff --git a/entity/id_interleaved.go b/entity/id_interleaved.go
index 28c59a42..7ae6d72e 100644
--- a/entity/id_interleaved.go
+++ b/entity/id_interleaved.go
@@ -22,7 +22,7 @@ func (ci CombinedId) String() string {
// Human return the identifier, shortened for human consumption
func (ci CombinedId) Human() string {
- format := fmt.Sprintf("%%.%ds", humanIdLength)
+ format := fmt.Sprintf("%%.%ds", HumanIdLength)
return fmt.Sprintf(format, ci)
}