summaryrefslogtreecommitdiff
path: root/tree.go
diff options
context:
space:
mode:
authorCarlos Martín Nieto <[email protected]>2013-09-12 10:46:20 +0200
committerCarlos Martín Nieto <[email protected]>2013-09-12 10:46:20 +0200
commitb5aca803db4cf9adce0a037cc5ccc47c4c045510 (patch)
tree0280a0e5148bff28de858393bdfc1e1420d3b799 /tree.go
parent00e3df94c7e06ab66fe4618d3252458163e4a404 (diff)
Give each const group a type
This allows us to restrict which constants the compiler will allow through, and makes the sorting in the documentation better.
Diffstat (limited to 'tree.go')
-rw-r--r--tree.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/tree.go b/tree.go
index d1a7c59..3abd31c 100644
--- a/tree.go
+++ b/tree.go
@@ -13,8 +13,9 @@ import (
"unsafe"
)
+type Filemode int
const (
- FilemodeNew = C.GIT_FILEMODE_NEW
+ FilemodeNew Filemode = C.GIT_FILEMODE_NEW
FilemodeTree = C.GIT_FILEMODE_TREE
FilemodeBlob = C.GIT_FILEMODE_BLOB
FilemodeBlobExecutable = C.GIT_FILEMODE_BLOB_EXECUTABLE