chore: style fixes from go fix (#10846)
Just `go fix ./...` Signed-off-by: Jakob Borg <jakob@kastelo.net>
This commit is contained in:
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
// You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
//go:build solaris
|
||||
// +build solaris
|
||||
|
||||
package ur
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user