style(lint): forcetypeassert

This commit is contained in:
Samuel Berthe
2025-09-20 01:30:25 +02:00
parent ed4a7c8589
commit 825a12a873
2 changed files with 2 additions and 2 deletions

View File

@@ -25,7 +25,7 @@ func messageFromMsgAndArgs(msgAndArgs ...any) string {
return fmt.Sprintf("%+v", msgAndArgs[0])
}
if len(msgAndArgs) > 1 {
return fmt.Sprintf(msgAndArgs[0].(string), msgAndArgs[1:]...) //nolint:errcheck
return fmt.Sprintf(msgAndArgs[0].(string), msgAndArgs[1:]...) //nolint:errcheck,forcetypeassert
}
return ""
}

View File

@@ -106,7 +106,7 @@ func FromAnySlice[T any](in []any) (out []T, ok bool) {
result := make([]T, len(in))
for i := range in {
result[i] = in[i].(T) //nolint:errcheck
result[i] = in[i].(T) //nolint:errcheck,forcetypeassert
}
return result, true
}