Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json: cannot unmarshal array into Go value of type github.Repository #3217

Open
hq-zhonger opened this issue Jul 24, 2024 · 1 comment
Open

Comments

@hq-zhonger
Copy link

client := github.NewClient(nil).WithAuthToken(e.getGithubToken())
ctx, cancelFunc := context.WithTimeout(context.Background(), 5*time.Second)
defer cancelFunc()
repo, _, err := client.Repositories.Get(ctx, "google/go-github", "commits")
if err != nil {
log.Fatal(err)
}

fmt.Println(repo)

2024/07/24 14:54:44 json: cannot unmarshal array into Go value of type github.Repository

@gmlewis
Copy link
Collaborator

gmlewis commented Jul 25, 2024

Could you please give us more information by sharing the output when using
https://github.com/gmlewis/go-httpdebug
with this call?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants