aboutsummaryrefslogtreecommitdiffstats
path: root/utils/binary/write.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-07-27 09:34:58 +0200
committerMáximo Cuadros <mcuadros@gmail.com>2017-07-27 09:34:58 +0200
commit48900a1c810dd2dac9cb44511e6a2412d3064da6 (patch)
treefb0042909e7bc55b9862ef2515d84eb1758b5ec7 /utils/binary/write.go
parente19163e22eb19b352dd022f6edc9d81e1cd7a7ed (diff)
downloadgo-git-48900a1c810dd2dac9cb44511e6a2412d3064da6.tar.gz
format: idxfile, support for >2Gb packfiles
Diffstat (limited to 'utils/binary/write.go')
-rw-r--r--utils/binary/write.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/utils/binary/write.go b/utils/binary/write.go
index 2ec3581..c08c73a 100644
--- a/utils/binary/write.go
+++ b/utils/binary/write.go
@@ -31,6 +31,12 @@ func WriteVariableWidthInt(w io.Writer, n int64) error {
return err
}
+// WriteUint64 writes the binary representation of a uint64 into w, in BigEndian
+// order
+func WriteUint64(w io.Writer, value uint64) error {
+ return binary.Write(w, binary.BigEndian, value)
+}
+
// WriteUint32 writes the binary representation of a uint32 into w, in BigEndian
// order
func WriteUint32(w io.Writer, value uint32) error {