From 1997bc8a150b92783060cc7129e1ee72a761182b Mon Sep 17 00:00:00 2001 From: Kyren223 Date: Sun, 20 Oct 2024 11:36:43 +0300 Subject: refactor: mid refactor --- pkg/assert/assert.go | 2 +- pkg/snowflake/snowflake.go | 7 +++--- pkg/util/io.go | 57 -------------------------------------------- pkg/util/io_test.go | 59 ---------------------------------------------- 4 files changed, 4 insertions(+), 121 deletions(-) delete mode 100644 pkg/util/io.go delete mode 100644 pkg/util/io_test.go (limited to 'pkg') diff --git a/pkg/assert/assert.go b/pkg/assert/assert.go index 6c4a4f5..7281a95 100644 --- a/pkg/assert/assert.go +++ b/pkg/assert/assert.go @@ -14,7 +14,7 @@ func NoError(err error, message string, a ...any) { } } -func Unreachable(message string, a ...any) { +func Never(message string, a ...any) { log.Fatalf(message+"\n", a...) } diff --git a/pkg/snowflake/snowflake.go b/pkg/snowflake/snowflake.go index 5b58cbb..bb4a07b 100644 --- a/pkg/snowflake/snowflake.go +++ b/pkg/snowflake/snowflake.go @@ -13,11 +13,10 @@ const ( // Epoch is set to the twitter snowflake epoch of Nov 04 2010 01:42:54 UTC in milliseconds // TODO: change this to eko epoch when eko is production ready Epoch int64 = 1288834974657 - nodeBits = 10 stepBits = 12 - nodeMax = 1<