mirror of
https://github.com/wahyd4/forego.git
synced 2026-08-08 21:01:01 +10:00
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 ```
This commit is contained in:
committed by
David Dollar
parent
7a6954ecc4
commit
d42165a186
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user