The main branch can be broken. Make sure to use tagged releases.
For authentication, check out this document.
To use the default client(s), you can try something like:
ctx := context.Background()
client, _ := iam.NewClient(ctx)
defer client.Close()
out, err := client.WhoAmI(ctx, &iam.WhoAmIRequest{})
log.Println(out, err)
...
You can also check the examples here.