go fmt
This commit is contained in:
@ -15,6 +15,7 @@ type Block interface {
|
||||
}
|
||||
|
||||
// This file stores all possible block states into a TAG_List with gzip compressed.
|
||||
//
|
||||
//go:embed block_states.nbt
|
||||
var blockStates []byte
|
||||
|
||||
|
@ -39,7 +39,6 @@ func NewEncoder(w io.Writer) *Encoder {
|
||||
// expect `[]int8`, `[]int32`, `[]int64`, `[]uint8`, `[]uint32` and `[]uint64`,
|
||||
// which TagByteArray, TagIntArray and TagLongArray.
|
||||
// To force encode them as TagList, add a struct field tag.
|
||||
//
|
||||
func (e *Encoder) Encode(v interface{}, tagName string) error {
|
||||
t, val := getTagType(reflect.ValueOf(v))
|
||||
return e.marshal(val, t, tagName)
|
||||
|
@ -136,6 +136,7 @@ func (d *Dialer) DialMCContext(ctx context.Context, addr string) (*Conn, error)
|
||||
// - now+Timeout
|
||||
// - d.Deadline
|
||||
// - the context's deadline
|
||||
//
|
||||
// Or zero, if none of Timeout, Deadline, or context's deadline is set.
|
||||
//
|
||||
// Copied from net/dial.go
|
||||
|
@ -9,6 +9,7 @@ func (r *Realms) Available() (ok bool, err error) {
|
||||
}
|
||||
|
||||
// Compatible returns whether the clients version is up to date with Realms.
|
||||
//
|
||||
// if the client is outdated, it returns OUTDATED,
|
||||
// if the client is running a snapshot, it returns OTHER,
|
||||
// else it returns COMPATIBLE.
|
||||
|
@ -14,7 +14,6 @@ import (
|
||||
"errors"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
"strings"
|
||||
|
||||
@ -153,7 +152,7 @@ func authentication(name, hash string) (*Resp, error) {
|
||||
}
|
||||
defer resp.Body.Close()
|
||||
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
body, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user