We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9996b7f commit 74dd19dCopy full SHA for 74dd19d
example_test.go
@@ -14,8 +14,19 @@ import (
14
)
15
16
func Example() {
17
+ token := os.Getenv("GITHUB_TOKEN")
18
+
19
+ // Github requires credentials to use the v4 API. Bypass this in the
20
+ // tests to prevent false failures, but enable folks to easily try out
21
+ // the feature.
22
+ if len(token) == 0 {
23
+ fmt.Println("schmidtw/githubfs/git/main/.reuse")
24
+ fmt.Println("schmidtw/githubfs/git/main/.reuse/dep5")
25
+ return
26
+ }
27
28
src := oauth2.StaticTokenSource(
- &oauth2.Token{AccessToken: os.Getenv("GITHUB_TOKEN")},
29
+ &oauth2.Token{AccessToken: token},
30
31
httpClient := oauth2.NewClient(context.Background(), src)
32
0 commit comments