From 7e0e1fbaad92952f674e6b8ad64cd3232331069c Mon Sep 17 00:00:00 2001 From: Bryan Boreham Date: Mon, 30 Nov 2015 12:07:59 +0000 Subject: [PATCH] Adjust formatting after review feedback; hostnames up to 14 chars will now align --- prog/weaver/http.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/prog/weaver/http.go b/prog/weaver/http.go index 1e7c0480..1dc84925 100644 --- a/prog/weaver/http.go +++ b/prog/weaver/http.go @@ -60,8 +60,8 @@ var rootTemplate = template.New("root").Funcs(map[string]interface{}{ } percentageRanges := float32(ips) * 100.0 / float32(status.RangeNumIPs) - displayName := name + " (" + nickName + "):" - fmt.Fprintf(&buffer, "%-32s %8d IPs (%04.1f%% of total) %s\n", + displayName := name + "(" + nickName + ")" + fmt.Fprintf(&buffer, "%-37v %8d IPs (%04.1f%% of total) %s\n", displayName, ips, percentageRanges, reachableStr) } @@ -198,7 +198,7 @@ var peersTemplate = defTemplate("peers", `\ {{.Name}}({{.NickName}}) {{range .Connections}}\ {{if .Outbound}}->{{else}}<-{{end}} {{printf "%-21v" .Address}} \ -{{$nameNickName := printf "%v(%v)" .Name .NickName}}{{printf "%-32v" $nameNickName}} \ +{{$nameNickName := printf "%v(%v)" .Name .NickName}}{{printf "%-37v" $nameNickName}} \ {{if .Established}}established{{else}}pending{{end}} {{end}}\ {{end}}\