Skip to content

Commit 90086a2

Browse files
authored
Merge pull request #6 from jollheef/master
Add context to update function (go-github API changed) This happened because some dependencies (like go-github) weren't vendored. I vendored all dependencies so future API changes won't break this package.
2 parents 234ac7d + a8b4c22 commit 90086a2

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)