From 2809be4542e52448d2208c95fcca2e1079385f3f Mon Sep 17 00:00:00 2001 From: Tnze Date: Tue, 16 Jul 2019 23:32:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=BB=A3=E7=A0=81=E4=B8=AD?= =?UTF-8?q?=E7=9A=84=E8=8B=A5=E5=B9=B2=E6=8B=BC=E5=86=99=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/mcping/mcping.go | 2 +- cmd/substitute_server/substitute.go | 4 ++-- net/packet/types.go | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cmd/mcping/mcping.go b/cmd/mcping/mcping.go index 5686aac..a74ca6a 100644 --- a/cmd/mcping/mcping.go +++ b/cmd/mcping/mcping.go @@ -1,4 +1,4 @@ -// Useage: go run cmd/ping/ping.go localhost +// Usage: go run cmd/ping/ping.go localhost package main import ( diff --git a/cmd/substitute_server/substitute.go b/cmd/substitute_server/substitute.go index 4ee0366..e0a9df9 100644 --- a/cmd/substitute_server/substitute.go +++ b/cmd/substitute_server/substitute.go @@ -225,8 +225,8 @@ func getStatus() pk.Packet { } } -func disconnectID(protocal int32) byte { - switch protocal { +func disconnectID(protocol int32) byte { + switch protocol { case 404: return 0x1B case 477, 480: diff --git a/net/packet/types.go b/net/packet/types.go index 86edbbb..d5cbba1 100644 --- a/net/packet/types.go +++ b/net/packet/types.go @@ -13,12 +13,12 @@ type Field interface { FieldDecoder } -// A FieldEncoder can be encode as minecraft protocal used. +// A FieldEncoder can be encode as minecraft protocol used. type FieldEncoder interface { Encode() []byte } -// A FieldDecoder can Decode from minecraft protocal +// A FieldDecoder can Decode from minecraft protocol type FieldDecoder interface { Decode(r DecodeReader) error }