Connection Metadata
loopingrage opened this issue · comments
Hey there. I'm trying to create a Connection
with metadata but for the life of me can't figure out why the Connection struct is expecting an interface pointer. Why not a map[string]interface{}
like in UserMetadata?
Can you provide an example of how the interface pointer is intended to be used?
Hi @loopingrage, if I recall correctly, at the time this code was written the api docs were not particularly descriptive of this field. Therefore the safest thing I could use was the empty interface{}
which means you can use any type you want.
The fact that it's a pointer to an empty interface is most probably a mistake. As the docs have since been updated we could be more specific and use a map[string]interface{}
as we do with UserMetadata
.
Are you up for submitting a PR?