mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Fix styling issue with IPInfo module
Signed-off-by: Chris Cummer <chriscummer@me.com>
This commit is contained in:
parent
98de21374a
commit
9bea20442f
@ -80,14 +80,14 @@ func (widget *Widget) setResult(info *ipinfo) {
|
||||
formatableText("City", "City") +
|
||||
formatableText("Region", "Region") +
|
||||
formatableText("Country", "Country") +
|
||||
formatableText("Coords", "Coordinates") +
|
||||
formatableText("Loc", "Coordinates") +
|
||||
formatableText("Org", "Organization"),
|
||||
)
|
||||
|
||||
resultBuffer := new(bytes.Buffer)
|
||||
|
||||
resultTemplate.Execute(resultBuffer, map[string]string{
|
||||
"nameColor": widget.settings.common.Colors.Subheading,
|
||||
"subheadingColor": widget.settings.common.Colors.Subheading,
|
||||
"valueColor": widget.settings.common.Colors.Text,
|
||||
"Ip": info.Ip,
|
||||
"Hostname": info.Hostname,
|
||||
@ -103,5 +103,5 @@ func (widget *Widget) setResult(info *ipinfo) {
|
||||
}
|
||||
|
||||
func formatableText(key, value string) string {
|
||||
return fmt.Sprintf(" [{{.nameColor}}]%8s: [{{.valueColor}}]{{.%s}}\n", key, value)
|
||||
return fmt.Sprintf(" [{{.subheadingColor}}]%8s[-:-:-] [{{.valueColor}}]{{.%s}}\n", key, value)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user