Migrate to new uuid library
This commit is contained in:
+3
-3
@@ -1,7 +1,7 @@
|
||||
package auth
|
||||
|
||||
import (
|
||||
uuid "github.com/nu7hatch/gouuid"
|
||||
uuid "github.com/gofrs/uuid"
|
||||
"github.com/writeas/web-core/log"
|
||||
"strings"
|
||||
)
|
||||
@@ -16,7 +16,7 @@ func GetToken(header string) []byte {
|
||||
token = f[1]
|
||||
}
|
||||
}
|
||||
t, err := uuid.ParseHex(token)
|
||||
t, err := uuid.FromString(token)
|
||||
if err != nil {
|
||||
log.Error("Couldn't parseHex on '%s': %v", accessToken, err)
|
||||
} else {
|
||||
@@ -31,7 +31,7 @@ func GetHeaderToken(header string) []byte {
|
||||
if len(header) > 0 {
|
||||
f := strings.Fields(header)
|
||||
if len(f) == 2 && f[0] == "Token" {
|
||||
t, err := uuid.ParseHex(f[1])
|
||||
t, err := uuid.FromString(f[1])
|
||||
if err != nil {
|
||||
log.Error("Couldn't parseHex on '%s': %v", accessToken, err)
|
||||
} else {
|
||||
|
||||
@@ -3,10 +3,10 @@ module github.com/writeas/web-core
|
||||
go 1.10
|
||||
|
||||
require (
|
||||
github.com/gofrs/uuid v3.3.0+incompatible
|
||||
github.com/kr/pretty v0.1.0 // indirect
|
||||
github.com/kylemcc/twitter-text-go v0.0.0-20180726194232-7f582f6736ec
|
||||
github.com/microcosm-cc/bluemonday v1.0.2
|
||||
github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
|
||||
github.com/writeas/impart v1.1.0
|
||||
github.com/writeas/nerds v1.0.0
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
github.com/gofrs/uuid v1.2.0 h1:coDhrjgyJaglxSjxuJdqQSSdUpG3w6p1OwN2od6frBU=
|
||||
github.com/gofrs/uuid v3.3.0+incompatible h1:8K4tyRfvU1CYPgJsveYFQMhpFd/wXNM7iK6rR7UHz84=
|
||||
github.com/gofrs/uuid v3.3.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
||||
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=
|
||||
@@ -7,8 +10,6 @@ github.com/kylemcc/twitter-text-go v0.0.0-20180726194232-7f582f6736ec h1:ZXWuspq
|
||||
github.com/kylemcc/twitter-text-go v0.0.0-20180726194232-7f582f6736ec/go.mod h1:voECJzdraJmolzPBgL9Z7ANwXf4oMXaTCsIkdiPpR/g=
|
||||
github.com/microcosm-cc/bluemonday v1.0.2 h1:5lPfLTTAvAbtS0VqT+94yOtFnGfUWYyx0+iToC3Os3s=
|
||||
github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc=
|
||||
github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d h1:VhgPp6v9qf9Agr/56bj7Y/xa04UccTW04VP0Qed4vnQ=
|
||||
github.com/nu7hatch/gouuid v0.0.0-20131221200532-179d4d0c4d8d/go.mod h1:YUTz3bUH2ZwIWBy3CJBeOBEugqcmXREj14T+iG/4k4U=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
|
||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
||||
github.com/writeas/impart v1.1.0 h1:nPnoO211VscNkp/gnzir5UwCDEvdHThL5uELU60NFSE=
|
||||
|
||||
Reference in New Issue
Block a user