From 8df0e89ed596504a23dd843ac44b6ab454816eb1 Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Tue, 6 Aug 2013 22:24:03 +0200 Subject: Now using ReadByte from kagus. --- nbt/nbt.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'nbt') diff --git a/nbt/nbt.go b/nbt/nbt.go index 26bace5..5363d1b 100644 --- a/nbt/nbt.go +++ b/nbt/nbt.go @@ -3,6 +3,7 @@ package nbt import ( "encoding/binary" "errors" + "github.com/kch42/kagus" "io" ) @@ -18,12 +19,6 @@ type TagList struct { type TagCompound map[string]Tag -func readByte(r io.Reader) (byte, error) { - buf := make([]byte, 1) - _, err := r.Read(buf) - return buf[0], err -} - func readTagData(r io.Reader, tt TagType) (interface{}, error) { switch tt { case TAG_End: @@ -76,7 +71,7 @@ func readTagData(r io.Reader, tt TagType) (interface{}, error) { _, err := io.ReadFull(r, data) return string(data), err case TAG_List: - ltt, err := readByte(r) + _ltt, err := kagus.ReadByte(r) if err != nil { return nil, err } -- cgit v1.2.3-70-g09d2