diff options
Diffstat (limited to 'nbt')
-rw-r--r-- | nbt/nbt.go | 9 |
1 files changed, 2 insertions, 7 deletions
@@ -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 } |