Skip to content

Commit

Permalink
feat(docs): delete println
Browse files Browse the repository at this point in the history
  • Loading branch information
gobenpark committed Aug 18, 2023
1 parent d73447b commit 60f5ebd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package ebest_go
import (
"context"
"errors"
"fmt"
"io"
"net/http"
"os"
Expand Down Expand Up @@ -81,18 +80,17 @@ func NewClient(options ...ClientOption) *Client {
tk, _ := jwt.Parse(string(bt), nil)
d, err := tk.Claims.GetExpirationTime()

fmt.Println(d)
if err != nil {
panic(err)
}
if d.Before(time.Now()) {
tk, err := client.AccessToken(context.Background())
if err != nil {
fmt.Println(err)
client.log.Error("err", zap.Error(err))
}
f, err := os.Create("token")
if err != nil {
fmt.Println(err)
client.log.Error("err", zap.Error(err))
}
client.accessToken = tk
f.Write([]byte(tk))
Expand Down

0 comments on commit 60f5ebd

Please sign in to comment.