go-bitbucket icon indicating copy to clipboard operation
go-bitbucket copied to clipboard

Result must be addressable (a pointer)

Open stobias123 opened this issue 7 years ago • 1 comments

If this is a noob mistake I apologize, I've asked around on slack/IRC and can't seem to figure out what I'm doing wrong here... Other people seemed stumped too.

I copied your test case for repos and get the following error..

package main

import (
	"github.com/ktrysmt/go-bitbucket"
)

func main() {

	client := bitbucket.NewBasicAuth("me", "pass")
	ro := &bitbucket.RepositoryOptions{
		Owner:     "owner",
		Repo_slug: "repo",
	}
	res, err := client.Repositories.Repository.Get(ro)
	if err == nil {
		print(res)
		print("no error!")
	}
	panic(err)
}
[2] % go run test.go                                                                                                                                                                                   /tmp
panic: result must be addressable (a pointer)

goroutine 1 [running]:
main.main()
	/tmp/test.go:19 +0x14c
exit status 2

I'm on go 1.10.

stobias123 avatar Mar 21 '18 04:03 stobias123

Oops, I did not tested on v1.10, and I will. Thank you for your issue.

ktrysmt avatar Mar 25 '18 04:03 ktrysmt