diff --git a/encoding_test.go b/encoding_test.go index b2d3fb4..d01a555 100644 --- a/encoding_test.go +++ b/encoding_test.go @@ -1,10 +1,16 @@ package sqids import ( + "math" "reflect" "testing" ) +const ( + minUint64Value = uint64(0) + maxUint64Value = uint64(math.MaxUint64) +) + func BenchmarkEncodeDecode(b *testing.B) { numbers := []uint64{1, 2, 3, 4, 5} diff --git a/sqids.go b/sqids.go index 44a5788..4b990f8 100644 --- a/sqids.go +++ b/sqids.go @@ -4,15 +4,12 @@ package sqids import ( "errors" - "math" "strings" ) const ( defaultAlphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" minAlphabetLength = 3 - minUint64Value = uint64(0) - maxUint64Value = uint64(math.MaxUint64) ) var defaultBlocklist []string = newDefaultBlocklist()