Replace interface{}

This commit is contained in:
Philipp Heckel 2022-10-01 16:31:48 -04:00
parent eaf3e83e72
commit 5014bba0b3
7 changed files with 17 additions and 17 deletions

View file

@ -241,7 +241,7 @@ func BasicAuth(user, pass string) string {
// MaybeMarshalJSON returns a JSON string of the given object, or "<cannot serialize>" if serialization failed.
// This is useful for logging purposes where a failure doesn't matter that much.
func MaybeMarshalJSON(v interface{}) string {
func MaybeMarshalJSON(v any) string {
jsonBytes, err := json.MarshalIndent(v, "", " ")
if err != nil {
return "<cannot serialize>"