From a857b45bac55d1e7954994b72126099c5e44c71f Mon Sep 17 00:00:00 2001 From: Ben Johnson Date: Thu, 20 Feb 2014 09:24:02 -0700 Subject: Check for sequence overflow. --- const.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'const.go') diff --git a/const.go b/const.go index 9ad7d25..00228be 100644 --- a/const.go +++ b/const.go @@ -2,6 +2,13 @@ package bolt const version = 1 +const ( + maxUint = ^uint(0) + minUint = 0 + maxInt = int(^uint(0) >> 1) + minInt = -maxInt - 1 +) + const ( // MaxBucketNameSize is the maximum length of a bucket name, in bytes. MaxBucketNameSize = 255 -- cgit v1.2.3