Run gofumpt on the project

This commit is contained in:
Jacalz
2025-09-17 22:30:49 +02:00
parent 534a7bfaaf
commit 08f335da44
41 changed files with 92 additions and 84 deletions
+3 -3
View File
@@ -225,7 +225,7 @@ func colorToHexAndOpacity(color color.Color) (hexStr, aStr string) {
r, g, b, a := toNRGBA(color)
cBytes := []byte{byte(r), byte(g), byte(b)}
hexStr, aStr = "#"+hex.EncodeToString(cBytes), strconv.FormatFloat(float64(a)/0xff, 'f', 6, 64)
return
return hexStr, aStr
}
// toNRGBA converts a color to RGBA values which are not premultiplied, unlike color.RGBA().
@@ -300,7 +300,7 @@ func toNRGBA(c color.Color) (r, g, b, a int) {
default: // RGBA, RGBA64, and unknown implementations of Color
r, g, b, a = unmultiplyAlpha(c)
}
return
return r, g, b, a
}
// unmultiplyAlpha returns a color's RGBA components as 8-bit integers by calling c.RGBA() and then removing the alpha premultiplication.
@@ -317,5 +317,5 @@ func unmultiplyAlpha(c color.Color) (r, g, b, a int) {
g = int(green >> 8)
b = int(blue >> 8)
a = int(alpha >> 8)
return
return r, g, b, a
}
+1 -1
View File
@@ -55,7 +55,7 @@ func dateFormatForLocale(locale string) DateFormat {
}
func shortMonthName(month int) string {
var months = [12]string{"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec"}
months := [12]string{"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec"}
if month >= 1 && month <= 12 {
return lang.L(months[month-1])
}