aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorJakob Unterwurzacher2024-01-23 21:36:24 +0100
committerJakob Unterwurzacher2024-01-23 21:36:24 +0100
commit9958b63931aee613d5f97a8e7137efa3fb118343 (patch)
tree1a6985c23a4f58d76fc1e60ffde2b2e494b73269 /internal
parent6fbe61d11017051b035cebe00b66481203a2a036 (diff)
go.mod: update all deps
Diffstat (limited to 'internal')
-rw-r--r--internal/generation_num/generation_num.go11
1 files changed, 11 insertions, 0 deletions
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)
+}