Skip to content

Commit cd4a0cc

Browse files
committed
Use context.Background()
main.go:46:25: SA1019: oauth2.NoContext is deprecated: Use context.Background() or context.TODO() instead. (staticcheck) tc := oauth2.NewClient(oauth2.NoContext, ts) ^
1 parent f36cde0 commit cd4a0cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ func run() error {
4343
ts := oauth2.StaticTokenSource(
4444
&oauth2.Token{AccessToken: githubToken},
4545
)
46-
tc := oauth2.NewClient(oauth2.NoContext, ts)
4746
ctx := context.Background()
47+
tc := oauth2.NewClient(ctx, ts)
4848

4949
client := github.NewClient(tc)
5050

0 commit comments

Comments
 (0)