diff options
Diffstat (limited to 'vendor/github.com/allegro/bigcache/utils.go')
-rw-r--r-- | vendor/github.com/allegro/bigcache/utils.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/github.com/allegro/bigcache/utils.go b/vendor/github.com/allegro/bigcache/utils.go new file mode 100644 index 000000000..ca1df79b9 --- /dev/null +++ b/vendor/github.com/allegro/bigcache/utils.go @@ -0,0 +1,16 @@ +package bigcache + +func max(a, b int) int { + if a > b { + return a + } + return b +} + +func convertMBToBytes(value int) int { + return value * 1024 * 1024 +} + +func isPowerOfTwo(number int) bool { + return (number & (number - 1)) == 0 +} |