From 0a28b80c8fedc8255c7d6c470c73d8fcf7695e8e Mon Sep 17 00:00:00 2001 From: Matt Joiner Date: Thu, 24 Apr 2025 23:03:12 +1000 Subject: [PATCH] Fix dumpStats to reuse spew config --- stats.go | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/stats.go b/stats.go index 90144bf7..4be5458a 100644 --- a/stats.go +++ b/stats.go @@ -6,7 +6,13 @@ import ( "github.com/davecgh/go-spew/spew" ) -func dumpStats[T any](w io.Writer, stats T) { - spew.NewDefaultConfig() - spew.Fdump(w, stats) +var spewConfig = spew.NewDefaultConfig() + +func init() { + //spewConfig.DisablePointerAddresses = true + //spewConfig.DisablePointerMethods = true +} + +func dumpStats(w io.Writer, a ...any) { + spewConfig.Fdump(w, a...) } -- 2.48.1