diff options
author | Kevin Chabowski <kevin@kch42.de> | 2013-08-06 22:24:03 +0200 |
---|---|---|
committer | Kevin Chabowski <kevin@kch42.de> | 2013-08-06 22:24:03 +0200 |
commit | 8df0e89ed596504a23dd843ac44b6ab454816eb1 (patch) | |
tree | bb5682884dd58e8dd6239cfc4ecc91c7b071aa5e /nbt | |
parent | df3bbe12423bef6f9a04d53966ec9394de07edee (diff) | |
download | gonbt-8df0e89ed596504a23dd843ac44b6ab454816eb1.tar.gz gonbt-8df0e89ed596504a23dd843ac44b6ab454816eb1.tar.bz2 gonbt-8df0e89ed596504a23dd843ac44b6ab454816eb1.zip |
Now using ReadByte from kagus.
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 } |