Skip to content

Commit

Permalink
feat: add WithInfoFunc configuration option
Browse files Browse the repository at this point in the history
  • Loading branch information
alexliesenfeld committed Sep 26, 2024
1 parent ecc74f0 commit aa090d5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions check.go
Original file line number Diff line number Diff line change
Expand Up @@ -565,10 +565,10 @@ func withInterceptors(interceptors []Interceptor, target InterceptorFunc) Interc
func createInfoMap(infoMap map[string]interface{}, infoFuncs []func(map[string]interface{})) map[string]interface{} {
// TODO: This solution will always create a new map and hence unnecessarily use the heap
// (since the map we return will escape to the heap during escape analysis because the
// size is unknown at compile time). This may be improved by using a check specific
// map that is recycled, so that allocated heap is not wasted and may be reused
// from check execution to check execution (e.g., by cleaning it up after
// the execution using delete(checkSpecificMap, key).
// size is unknown at compile time). This may be improved by using a check specific
// map that is recycled, so that allocated heap is not wasted and may be reused
// from check execution to check execution (e.g., by cleaning it up after
// the execution using delete(checkSpecificMap, key).

if len(infoFuncs) == 0 {
return infoMap
Expand Down

0 comments on commit aa090d5

Please sign in to comment.