From 4bafaf07fd47aadc7385f8b025067ff4e5845819 Mon Sep 17 00:00:00 2001 From: wjvlangz Date: Wed, 27 Mar 2013 21:46:07 +0800 Subject: [PATCH] Create Uvarint.md --- encoding/binary/Uvarint.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 encoding/binary/Uvarint.md diff --git a/encoding/binary/Uvarint.md b/encoding/binary/Uvarint.md new file mode 100644 index 00000000..74b76627 --- /dev/null +++ b/encoding/binary/Uvarint.md @@ -0,0 +1,17 @@ +## func Uvarint(buf []byte) (uint64, int) + +###参数列表 + +- buf 需写入的缓冲区 +- x uint64类型数字 + +###返回值: + +- int 写入字节数。 +- panic buf过小。 + +###功能说明: + +PutUvarint主要是将uint64类型放入buf中,并返回写入的字节数。如果buf过小,putUvarint将抛出panic。 + +###代码实例: