fix golint
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
# Go-MC
|
# Go-MC
|
||||||
|
|
||||||

|

|
||||||
[](https://pkg.go.dev/github.com/Tnze/go-mc)
|
[](https://pkg.go.dev/github.com/Tnze/go-mc)
|
||||||
[](https://goreportcard.com/report/github.com/Tnze/go-mc)
|
[](https://goreportcard.com/report/github.com/Tnze/go-mc)
|
||||||
[](https://travis-ci.org/Tnze/go-mc)
|
[](https://travis-ci.org/Tnze/go-mc)
|
||||||
|
@ -16,8 +16,8 @@ import (
|
|||||||
pk "github.com/Tnze/go-mc/net/packet"
|
pk "github.com/Tnze/go-mc/net/packet"
|
||||||
)
|
)
|
||||||
|
|
||||||
// ProtocolVersion , the protocol version number of minecraft net protocol
|
// ProtocolVersion is the protocol version number of minecraft net protocol
|
||||||
const ProtocolVersion = 756
|
const ProtocolVersion = 757
|
||||||
const DefaultPort = 25565
|
const DefaultPort = 25565
|
||||||
|
|
||||||
// JoinServer connect a Minecraft server for playing the game.
|
// JoinServer connect a Minecraft server for playing the game.
|
||||||
@ -31,7 +31,7 @@ func (c *Client) JoinServerWithDialer(d *net.Dialer, addr string) (err error) {
|
|||||||
return c.join(d, addr)
|
return c.join(d, addr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// parseAddress will lookup SRV records for the address
|
// parseAddress will look up SRV records for the address
|
||||||
func parseAddress(r *net.Resolver, addr string) (string, error) {
|
func parseAddress(r *net.Resolver, addr string) (string, error) {
|
||||||
var port uint16
|
var port uint16
|
||||||
var addrErr *net.AddrError
|
var addrErr *net.AddrError
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
//+build generate
|
//go:build generate
|
||||||
|
// +build generate
|
||||||
|
|
||||||
// gen_blocks.go generates block information.
|
// gen_blocks.go generates block information.
|
||||||
package main
|
package main
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
//+build generate
|
//go:build generate
|
||||||
|
// +build generate
|
||||||
|
|
||||||
// gen_entity.go generates entity information.
|
// gen_entity.go generates entity information.
|
||||||
package main
|
package main
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
//+build generate
|
//go:build generate
|
||||||
|
// +build generate
|
||||||
|
|
||||||
// gen_item.go generates item information.
|
// gen_item.go generates item information.
|
||||||
package main
|
package main
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
//+build generate
|
//go:build generate
|
||||||
|
// +build generate
|
||||||
|
|
||||||
//gen_packetid.go generates the enumeration of packet IDs used on the wire.
|
//gen_packetid.go generates the enumeration of packet IDs used on the wire.
|
||||||
package main
|
package main
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
//+build generate
|
//go:build generate
|
||||||
|
// +build generate
|
||||||
|
|
||||||
// gen_soundid.go generates the enumeration of sound IDs.
|
// gen_soundid.go generates the enumeration of sound IDs.
|
||||||
package main
|
package main
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -279,7 +279,7 @@ func parseTag(f reflect.StructField, v reflect.Value, tagName string) (result ta
|
|||||||
}
|
}
|
||||||
|
|
||||||
nbtType := f.Tag.Get("nbt_type")
|
nbtType := f.Tag.Get("nbt_type")
|
||||||
result.Type, v = getTagType(v)
|
result.Type, _ = getTagType(v)
|
||||||
if strings.Contains(nbtType, "list") {
|
if strings.Contains(nbtType, "list") {
|
||||||
if IsArrayTag(result.Type) {
|
if IsArrayTag(result.Type) {
|
||||||
result.Type = TagList // for expanding the array to a standard list
|
result.Type = TagList // for expanding the array to a standard list
|
||||||
|
@ -2,7 +2,7 @@ package server
|
|||||||
|
|
||||||
import "github.com/Tnze/go-mc/net"
|
import "github.com/Tnze/go-mc/net"
|
||||||
|
|
||||||
const ProtocolVersion = 756
|
const ProtocolVersion = 757
|
||||||
|
|
||||||
type Server struct {
|
type Server struct {
|
||||||
ListPingHandler
|
ListPingHandler
|
||||||
|
Reference in New Issue
Block a user