From 9958b63931aee613d5f97a8e7137efa3fb118343 Mon Sep 17 00:00:00 2001 From: Jakob Unterwurzacher Date: Tue, 23 Jan 2024 21:36:24 +0100 Subject: go.mod: update all deps --- internal/generation_num/generation_num.go | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 internal/generation_num/generation_num.go (limited to 'internal') diff --git a/internal/generation_num/generation_num.go b/internal/generation_num/generation_num.go new file mode 100644 index 0000000..298db14 --- /dev/null +++ b/internal/generation_num/generation_num.go @@ -0,0 +1,11 @@ +package generation_num + +import ( + "sync/atomic" +) + +var gen uint64 + +func Next() uint64 { + return atomic.AddUint64(&gen, 1) +} -- cgit v1.2.3