staticcheck

This commit is contained in:
Michael Yang
2025-11-16 19:09:23 -08:00
parent 78a75a30d8
commit d3228355be
44 changed files with 153 additions and 156 deletions

View File

@@ -1018,7 +1018,7 @@ func (d Duration) MarshalJSON() ([]byte, error) {
if d.Duration < 0 {
return []byte("-1"), nil
}
return []byte("\"" + d.Duration.String() + "\""), nil
return []byte("\"" + d.String() + "\""), nil
}
func (d *Duration) UnmarshalJSON(b []byte) (err error) {
@@ -1045,7 +1045,7 @@ func (d *Duration) UnmarshalJSON(b []byte) (err error) {
d.Duration = time.Duration(math.MaxInt64)
}
default:
return fmt.Errorf("Unsupported type: '%s'", reflect.TypeOf(v))
return fmt.Errorf("unsupported type: '%s'", reflect.TypeOf(v))
}
return nil