Adjust formatting after review feedback; hostnames up to 14 chars will now align

This commit is contained in:
Bryan Boreham committed 2015-11-30 12:07:59 +00:00
1 parent 8bbf8231d2
commit 7e0e1fbaad
1 file changed
+3 -3
+3 -3
View File
@@ -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}}\