From d42165a186c1e4bdc772b9fa4dff9506e9294537 Mon Sep 17 00:00:00 2001 From: Enrico Comiti Date: Sun, 9 Oct 2016 16:36:27 +0200 Subject: [PATCH] Fix longest name length (#90) Hi @ddollar, thanks for your work on Forego. Just an aesthetical issue: there is a wrong alignement when the longest name of processes has length 6. A Procfile: ``` qwerty: echo 'hi' ``` Output with current version: ``` forego | starting qwerty.1 on port 5000 qwerty.1 | hi ``` Output applying this commit: ``` forego | starting qwerty.1 on port 5000 qwerty.1 | hi ``` --- procfile.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/procfile.go b/procfile.go index 0d304e6..07b9837 100644 --- a/procfile.go +++ b/procfile.go @@ -47,6 +47,9 @@ func (pf *Procfile) LongestProcessName(concurrency map[string]int) (longest int) if c, ok := concurrency[entry.Name]; ok { // Add the number of digits thisLen += int(math.Log10(float64(c))) + 1 + } else { + // The index number after the dot. + thisLen += 1 } if thisLen > longest { longest = thisLen