summaryrefslogtreecommitdiff
path: root/nbt
diff options
context:
space:
mode:
authorKevin Chabowski <kevin@kch42.de>2013-08-06 22:24:03 +0200
committerKevin Chabowski <kevin@kch42.de>2013-08-06 22:24:03 +0200
commit8df0e89ed596504a23dd843ac44b6ab454816eb1 (patch)
treebb5682884dd58e8dd6239cfc4ecc91c7b071aa5e /nbt
parentdf3bbe12423bef6f9a04d53966ec9394de07edee (diff)
downloadgonbt-8df0e89ed596504a23dd843ac44b6ab454816eb1.tar.gz
gonbt-8df0e89ed596504a23dd843ac44b6ab454816eb1.tar.bz2
gonbt-8df0e89ed596504a23dd843ac44b6ab454816eb1.zip
Now using ReadByte from kagus.
Diffstat (limited to 'nbt')
-rw-r--r--nbt/nbt.go9
1 files changed, 2 insertions, 7 deletions
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
}