all: Run modernize -fix ./...

This commit is contained in:
Bjørn Erik Pedersen
2025-02-26 10:15:04 +01:00
parent b7ae24b9c2
commit 521911a576
141 changed files with 302 additions and 354 deletions

View File

@@ -99,7 +99,7 @@ func (c ReplacingJSONMarshaller) MarshalJSON() ([]byte, error) {
if c.OmitEmpty {
// It's tricky to do this with a regexp, so convert it to a map, remove zero values and convert back.
var m map[string]interface{}
var m map[string]any
err = json.Unmarshal(converted, &m)
if err != nil {
return nil, err
@@ -111,9 +111,9 @@ func (c ReplacingJSONMarshaller) MarshalJSON() ([]byte, error) {
delete(m, k)
} else {
switch vv := v.(type) {
case map[string]interface{}:
case map[string]any:
removeZeroVAlues(vv)
case []interface{}:
case []any:
for _, vvv := range vv {
if m, ok := vvv.(map[string]any); ok {
removeZeroVAlues(m)