From c809d37152ea87a66fc281730042dcb4299a8263 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Tue, 13 Aug 2019 16:02:13 +0200 Subject: more hash-->id fixes --- entity/id.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'entity') diff --git a/entity/id.go b/entity/id.go index 7fa1785a..7ff6b223 100644 --- a/entity/id.go +++ b/entity/id.go @@ -17,10 +17,12 @@ const UnsetId = Id("unset") // Id is an identifier for an entity or part of an entity type Id string +// String return the identifier as a string func (i Id) String() string { return string(i) } +// Human return the identifier, shortened for human consumption func (i Id) Human() string { format := fmt.Sprintf("%%.%ds", humanIdLength) return fmt.Sprintf(format, i) -- cgit