aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/cache/common.go
diff options
context:
space:
mode:
authorAntonio Jesus Navarro Perez <antonio@sourced.tech>2017-02-23 17:32:44 +0100
committerAntonio Jesus Navarro Perez <antonio@sourced.tech>2017-02-27 09:45:00 +0100
commitae887c94d02661a91814fa05b4b54ba723220e6b (patch)
tree7cf8f3a1514b2a4aabec14d2134a381b07525fa1 /plumbing/cache/common.go
parent39f43b52a2bdfbc73703e2d09b575d49cd70ede8 (diff)
downloadgo-git-ae887c94d02661a91814fa05b4b54ba723220e6b.tar.gz
plumbing/cache: specify units in memory size (Fix #234)
Diffstat (limited to 'plumbing/cache/common.go')
-rw-r--r--plumbing/cache/common.go4
1 files changed, 3 insertions, 1 deletions
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