Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 318fc27

Browse files
committed
Adapted to the change of signature of uuid.NewV4()
satori/go.uuid@0ef6afb
1 parent e44a7c9 commit 318fc27

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

‎token.go

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,12 @@ func (rs *TokenStore) Create(info oauth2.TokenInfo) (err error) {
5050
if code := info.GetCode(); code != "" {
5151
pipe.Set(code, jv, info.GetCodeExpiresIn())
5252
} else {
53-
basicID := uuid.NewV4().String()
53+
basicID, uerr := uuid.NewV4()
54+
if uerr != nil {
55+
err = uerr
56+
return
57+
}
58+
basicIDStr := basicID.String()
5459
aexp := info.GetAccessExpiresIn()
5560
rexp := aexp
5661

@@ -59,10 +64,10 @@ func (rs *TokenStore) Create(info oauth2.TokenInfo) (err error) {
5964
if aexp.Seconds() > rexp.Seconds() {
6065
aexp = rexp
6166
}
62-
pipe.Set(refresh, basicID, rexp)
67+
pipe.Set(refresh, basicIDStr, rexp)
6368
}
64-
pipe.Set(info.GetAccess(), basicID, aexp)
65-
pipe.Set(basicID, jv, rexp)
69+
pipe.Set(info.GetAccess(), basicIDStr, aexp)
70+
pipe.Set(basicIDStr, jv, rexp)
6671
}
6772

6873
if _, verr := pipe.Exec(); verr != nil {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /