From 9a960ee8684d675ab1f58b2766a967588268a8d3 Mon Sep 17 00:00:00 2001 From: Tnze Date: Sun, 28 Jul 2019 19:14:51 +0800 Subject: [PATCH] Use google's UUID lib --- cmd/mcping/mcping.go | 2 +- cmd/substitute_server/substitute.go | 2 +- go.mod | 6 +----- go.sum | 11 ++--------- net/packet/types.go | 3 ++- 5 files changed, 7 insertions(+), 17 deletions(-) diff --git a/cmd/mcping/mcping.go b/cmd/mcping/mcping.go index a74ca6a..fcbb0ca 100644 --- a/cmd/mcping/mcping.go +++ b/cmd/mcping/mcping.go @@ -10,7 +10,7 @@ import ( "github.com/Tnze/go-mc/bot" "github.com/Tnze/go-mc/chat" - uuid "github.com/satori/go.uuid" + "github.com/google/uuid" ) type status struct { diff --git a/cmd/substitute_server/substitute.go b/cmd/substitute_server/substitute.go index e0a9df9..938b04d 100644 --- a/cmd/substitute_server/substitute.go +++ b/cmd/substitute_server/substitute.go @@ -26,7 +26,7 @@ import ( "github.com/Tnze/go-mc/net" "github.com/Tnze/go-mc/net/CFB8" pk "github.com/Tnze/go-mc/net/packet" - uuid "github.com/satori/go.uuid" + "github.com/google/uuid" ) const verifyTokenLen = 16 diff --git a/go.mod b/go.mod index e37a96b..5bf52ac 100644 --- a/go.mod +++ b/go.mod @@ -2,8 +2,4 @@ module github.com/Tnze/go-mc go 1.12 -require ( - github.com/kr/pretty v0.1.0 // indirect - github.com/satori/go.uuid v1.2.0 - gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect -) +require github.com/google/uuid v1.1.1 diff --git a/go.sum b/go.sum index e8e99ec..b864886 100644 --- a/go.sum +++ b/go.sum @@ -1,9 +1,2 @@ -github.com/kr/pretty v0.1.0 h1:L/CwN0zerZDmRFUapSPitk6f+Q3+0za1rQkzVuMiMFI= -github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= -github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= -github.com/kr/text v0.1.0 h1:45sCR5RtlFHMR4UwH9sdQ5TC8v0qDQCHnXt+kaKSTVE= -github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= -github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww= -github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 h1:qIbj1fsPNlZgppZ+VLlY7N33q108Sa+fhmuc+sWQYwY= -gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +github.com/google/uuid v1.1.1 h1:Gkbcsh/GbpXz7lPftLA3P6TYMwjCLYm83jiFQZF/3gY= +github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= diff --git a/net/packet/types.go b/net/packet/types.go index d5cbba1..53fe4ec 100644 --- a/net/packet/types.go +++ b/net/packet/types.go @@ -1,6 +1,7 @@ package packet import ( + "github.com/google/uuid" "io" "math" @@ -70,7 +71,7 @@ type ( Angle int8 //UUID encoded as an unsigned 128-bit integer - UUID [16]byte + UUID = uuid.UUID //NBT encode a value as Named Binary Tag NBT struct {