go fmt
This commit is contained in:
@ -16,7 +16,7 @@ type Packet struct {
|
||||
Data []byte
|
||||
}
|
||||
|
||||
//Marshal generate Packet with the ID and Fields
|
||||
// Marshal generate Packet with the ID and Fields
|
||||
func Marshal(id int32, fields ...FieldEncoder) (pk Packet) {
|
||||
var pb Builder
|
||||
for _, v := range fields {
|
||||
@ -25,7 +25,7 @@ func Marshal(id int32, fields ...FieldEncoder) (pk Packet) {
|
||||
return pb.Packet(id)
|
||||
}
|
||||
|
||||
//Scan decode the packet and fill data into fields
|
||||
// Scan decode the packet and fill data into fields
|
||||
func (p Packet) Scan(fields ...FieldDecoder) error {
|
||||
r := bytes.NewReader(p.Data)
|
||||
for _, v := range fields {
|
||||
|
@ -404,7 +404,7 @@ func (d *Double) ReadFrom(r io.Reader) (n int64, err error) {
|
||||
return
|
||||
}
|
||||
|
||||
//NBT encode a value as Named Binary Tag
|
||||
// NBT encode a value as Named Binary Tag
|
||||
func NBT(v interface{}, optionalTagName ...string) Field {
|
||||
if len(optionalTagName) > 0 {
|
||||
return nbtField{V: v, FieldName: optionalTagName[0]}
|
||||
|
Reference in New Issue
Block a user