aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/cache/common.go
diff options
context:
space:
mode:
authorSantiago M. Mola <santi@mola.io>2017-02-27 17:14:54 +0100
committerGitHub <noreply@github.com>2017-02-27 17:14:54 +0100
commit0e9dea19f856e256e609c3390e000760d2b2b95a (patch)
tree1b50b78030d8d382da71166eb9d280be371b45bd /plumbing/cache/common.go
parenta8f1e517e302569f11fced521c3f091997dac147 (diff)
parentae887c94d02661a91814fa05b4b54ba723220e6b (diff)
downloadgo-git-0e9dea19f856e256e609c3390e000760d2b2b95a.tar.gz
Merge pull request #289 from ajnavarro/documentation/cache
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