Commit graph

2 commits

Author SHA1 Message Date
Gusted
b563c2a217 Use context.Background as context 2025-03-06 12:21:52 +00:00
Gusted
ad949404b7 fix: correct logging if caller has generics
- If the caller function has generics then
`runtime.FuncForPC(...).Name()` will not show the generic types and
instead collapse it to `[...]`. Remove this suffix from the function
name.
- This fixes an issue where the logging of functions that use generics
such as `db.Find` to be logged as `]()` instead of `Find()`, as the last
dot in `[...]` was being used as a cutoff point.
- Unit test added.

(cherry picked from commit 101efdd2e7)
2025-03-06 11:43:48 +00:00