Run gofumpt on the project
This commit is contained in:
+3
-3
@@ -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
@@ -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])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user