Skip to content

Commit d64577c

Browse files
authored
fix: pointer receiver on a copied struct (#83)
Discrepancies between the function returning the Stats struct and the Metrics() function Signed-off-by: Eliott Bouhana <[email protected]>
1 parent 405eb7a commit d64577c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

metrics.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const (
3535
)
3636

3737
// Metrics transform the stats returned by the WAF into a map of key value metrics for datadog backend
38-
func (stats *Stats) Metrics() map[string]any {
38+
func (stats Stats) Metrics() map[string]any {
3939
tags := make(map[string]any, len(stats.Timers)+len(stats.Truncations)+1)
4040
for k, v := range stats.Timers {
4141
tags[k] = uint64(v.Microseconds())

0 commit comments

Comments
 (0)