style: reenable switch check

This commit is contained in:
TheFox0x7 2024-07-17 19:19:36 +02:00
parent adf4dcdbbf
commit 8322882265
No known key found for this signature in database
GPG key ID: 6CA33903484AF7C2
19 changed files with 29 additions and 43 deletions

View file

@ -16,8 +16,9 @@ func GetItemByType(typ ap.ActivityVocabularyType) (ap.Item, error) {
switch typ {
case RepositoryType:
return RepositoryNew(""), nil
default:
return ap.GetItemByType(typ)
}
return ap.GetItemByType(typ)
}
// JSONUnmarshalerFn is the function that will load the data from a fastjson.Value into an Item
@ -28,8 +29,9 @@ func JSONUnmarshalerFn(typ ap.ActivityVocabularyType, val *fastjson.Value, i ap.
return OnRepository(i, func(r *Repository) error {
return JSONLoadRepository(val, r)
})
default:
return nil
}
return nil
}
// NotEmpty is the function that checks if an object is empty
@ -44,6 +46,7 @@ func NotEmpty(i ap.Item) bool {
return false
}
return ap.NotEmpty(r.Actor)
default:
return ap.NotEmpty(i)
}
return ap.NotEmpty(i)
}