chore: style fixes from go fix (#10846)

Just `go fix ./...`

Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
Jakob Borg
2026-08-05 20:23:22 +02:00
committed by GitHub
parent 946e2b83a1
commit 8ea09c0094
144 changed files with 211 additions and 315 deletions
+3 -3
View File
@@ -232,7 +232,7 @@ func (r Report) Value() (driver.Value, error) {
return string(bs), err
}
func (r *Report) Scan(value interface{}) error {
func (r *Report) Scan(value any) error {
// Zero out the previous value
// JSON un-marshaller does not touch fields that are not in the payload, so we carry over values from a previous
// scan.
@@ -245,7 +245,7 @@ func (r *Report) Scan(value interface{}) error {
return json.Unmarshal(b, &r)
}
func clear(v interface{}, since int) error {
func clear(v any, since int) error {
s := reflect.ValueOf(v).Elem()
t := s.Type()
@@ -269,7 +269,7 @@ func clear(v interface{}, since int) error {
}
// Dive deeper
if f.Kind() == reflect.Ptr {
if f.Kind() == reflect.Pointer {
f = f.Elem()
}
+1 -1
View File
@@ -118,7 +118,7 @@ func TestClean(t *testing.T) {
expect(t, 6, x)
}
func expect(t *testing.T, since int, b interface{}) {
func expect(t *testing.T, since int, b any) {
t.Helper()
x := testValue()
if err := clear(&x, since); err != nil {
-1
View File
@@ -5,7 +5,6 @@
// You can obtain one at https://mozilla.org/MPL/2.0/.
//go:build solaris
// +build solaris
package ur
-1
View File
@@ -5,7 +5,6 @@
// You can obtain one at https://mozilla.org/MPL/2.0/.
//go:build freebsd || openbsd || dragonfly
// +build freebsd openbsd dragonfly
package ur