status-go/vendor/github.com/allegro/bigcache/utils.go

17 lines
228 B
Go
Raw Normal View History

2018-12-19 10:02:07 +00:00
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
}