From ae887c94d02661a91814fa05b4b54ba723220e6b Mon Sep 17 00:00:00 2001 From: Antonio Jesus Navarro Perez Date: Thu, 23 Feb 2017 17:32:44 +0100 Subject: plumbing/cache: specify units in memory size (Fix #234) --- plumbing/cache/common.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'plumbing/cache/common.go') diff --git a/plumbing/cache/common.go b/plumbing/cache/common.go index 33fb2bc..8da5fb8 100644 --- a/plumbing/cache/common.go +++ b/plumbing/cache/common.go @@ -3,12 +3,14 @@ package cache import "srcd.works/go-git.v4/plumbing" const ( - Byte = 1 << (iota * 10) + Byte FileSize = 1 << (iota * 10) KiByte MiByte GiByte ) +type FileSize int64 + type Object interface { Add(o plumbing.EncodedObject) Get(k plumbing.Hash) plumbing.EncodedObject -- cgit