From: Bjørn Erik Pedersen Date: Mon, 15 May 2023 07:23:26 +0000 (+0200) Subject: Add a counter helper X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0988b76a781c3a5a9645d583bb2e038d51c79c06;p=brevno-suite%2Fhugo Add a counter helper --- diff --git a/common/types/types.go b/common/types/types.go index cee497bf4..c36c51b3e 100644 --- a/common/types/types.go +++ b/common/types/types.go @@ -17,6 +17,7 @@ package types import ( "fmt" "reflect" + "sync/atomic" "github.com/spf13/cast" ) @@ -90,3 +91,6 @@ func IsNil(v any) bool { type DevMarker interface { DevOnly() } + +// This is only used for debugging purposes. +var InvocationCounter atomic.Int64