Skip to content

Commit af199ed

Browse files
committed
Fix: unknown identifier error
- As seen in `pipelines/credhub-cli/jobs/update-go-modules/builds/34`, next update of go and go modules causes compliation error as follows: ``` go run -mod=mod github.com/onsi/ginkgo/v2/ginkgo -r --randomize-suites --randomize-all --race -p 2>&1 go: downloading github.com/onsi/ginkgo/v2 v2.22.2 go: downloading golang.org/x/tools v0.30.0 go: downloading github.com/go-task/slim-sprig/v3 v3.0.0 go: downloading github.com/go-task/slim-sprig v0.0.0-20230315185526-52ccab3ef572 go: downloading github.com/google/pprof v0.0.0-20250208200701-d0013a598941 Failed to compile auth: # code.cloudfoundry.org/credhub-cli/credhub/auth_test # [code.cloudfoundry.org/credhub-cli/credhub/auth_test] ./example_test.go:10:1: ExampleOAuth refers to unknown identifier: OAuth ``` - Do not know exactly what causes the error but chaning the function name resolves the error. - Changing the function name so next `update-go-modules` job build can pass.
1 parent 5af5e18 commit af199ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

credhub/auth/example_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"code.cloudfoundry.org/credhub-cli/credhub/auth"
88
)
99

10-
func ExampleOAuth() {
10+
func ExampleAuth() {
1111
_ = func() {
1212
// To retrieve the access token from the CredHub client, use type assertion
1313
ch, err := credhub.New(

0 commit comments

Comments
 (0)