Skip to content

Commit a8b4c22

Browse files
committed
Add context to update function (go-github API changed)
1 parent 613481c commit a8b4c22

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/update.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package cmd
22

33
import (
4+
"context"
45
"fmt"
56
"io/ioutil"
67
"log"
@@ -88,7 +89,7 @@ func shouldCheckForUpdate() bool {
8889

8990
func getLatestRelease() (rel *github.RepositoryRelease, err error) {
9091
gh := github.NewClient(&http.Client{Timeout: 1 * time.Second})
91-
rel, _, err = gh.Repositories.GetLatestRelease("clns", "gitlab-cli")
92+
rel, _, err = gh.Repositories.GetLatestRelease(context.Background(), "clns", "gitlab-cli")
9293
return
9394
}
9495

0 commit comments

Comments
 (0)