Fix wastedassign findings

chubin/logging
Igor Chubin 2 years ago
parent 8cdf491cb5
commit ba82bbd096

@ -29,7 +29,7 @@ var windDir = map[string]string{
func formatTemp(c cond) string {
color := func(temp int, explicitPlus bool) string {
col := 0
var col int
if !config.Inverse {
// Extemely cold temperature must be shown with violet
// because dark blue is too dark
@ -233,12 +233,10 @@ func formatWind(c cond) string {
}
}
hyphen := " - "
// if (config.Lang == "sl") {
// hyphen = "-"
// }
hyphen = "-"
hyphen := "-"
cWindGustKmph := color(c.WindGustKmph)
cWindspeedKmph := color(c.WindspeedKmph)

@ -10,6 +10,11 @@ import (
var slotTimes = [slotcount]int{9 * 60, 12 * 60, 18 * 60, 22 * 60}
func printDay(w weather) (ret []string) {
var (
dateName string
names string
)
hourly := w.Hourly
ret = make([]string, 5)
for i := range ret {
@ -53,7 +58,7 @@ func printDay(w weather) (ret []string) {
} else {
lctime.SetLocale("en_US")
}
dateName := ""
if config.RightToLeft {
dow := lctime.Strftime("%a", d)
day := lctime.Strftime("%d", d)
@ -102,7 +107,6 @@ func printDay(w weather) (ret []string) {
"└──────────────────────────────┴──────────────────────────────┘")
}
names := ""
if config.RightToLeft {
names = "│" + justifyCenter(trans[3], 29) + "│ " + justifyCenter(trans[2], 16) +
"└──────┬──────┘" + justifyCenter(trans[1], 16) + " │" + justifyCenter(trans[0], 29) + "│"

Loading…
Cancel
Save