Pointer problem with struct


(Miha) #1

Hey, need a little bit of your help:

here is exp: https://play.golang.org/p/0TEn_A7hVWM

my error is this: invalid indirect of pipedrive.ActivitiesCreateOptions literal (type pipedrive.ActivitiesCreateOptions)

and link to librarie: https://github.com/Genert/pipedrive-api/blob/master/pipedrive/activities.go


(Jakob Borg) #2

The code in your example shouldn’t (doesn’t, I would say) generate the error you describe.

The “invalid indirect of … literal” means you tried to pointer-dereference a struct literal: *foo{ ... }. Remove the star, or replace it with an ampersand if you wanted a pointer literal.