can parse TAG_String

This commit is contained in:
JunDao
2019-05-18 01:08:32 +08:00
parent 94fb6502db
commit 9cdab82ea3
4 changed files with 189 additions and 0 deletions

22
nbt/typeinfo.go Normal file
View File

@ -0,0 +1,22 @@
package nbt
import (
"reflect"
)
type typeInfo struct {
}
func getTypeInfo(typ reflect.Type) (*typeInfo, error) {
tinfo := new(typeInfo)
if typ.Kind() == reflect.Struct {
n := typ.NumField()
for i := 0; i < n; i++ {
f := typ.Field(i)
if (f.PkgPath != "" && !f.Anonymous) || f.Tag.Get("nbt") == "-" {
continue // Private field
}
}
}
return tinfo, nil
}