From d57e2fdd1977b9a5d4984d7146e66349001893b3 Mon Sep 17 00:00:00 2001 From: Michael Muré Date: Wed, 19 Sep 2018 21:45:04 +0200 Subject: commands: fix a panic on merge invalid --- bug/bug.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'bug') diff --git a/bug/bug.go b/bug/bug.go index 3af4337e..203d5a1a 100644 --- a/bug/bug.go +++ b/bug/bug.go @@ -576,8 +576,12 @@ func (bug *Bug) Id() string { // HumanId return the Bug identifier truncated for human consumption func (bug *Bug) HumanId() string { + return FormatHumanID(bug.Id()) +} + +func FormatHumanID(id string) string { format := fmt.Sprintf("%%.%ds", humanIdLength) - return fmt.Sprintf(format, bug.Id()) + return fmt.Sprintf(format, id) } // CreateLamportTime return the Lamport time of creation -- cgit