Shouldn't payload be a pointer
At this line,shouldn't the payload be a pointer.
Similarly at this line ,I think the data should be a pointer as we are passing p.payload.
Hi @crackerplace. Happy to see you get involved with apm-server.
The first payload you mentioned is an interface. So I think passing it here as is should work as expected or do you see any unwanted side affects?
For the second line you mentioned it's passed as value as we only extract the data and don't modify it. Passing it by pointer would also work but I prefer in general if not pointer is need to pass a copy except it would become a performance issue.
@ruflin thanks,Would be happy to contribute :-)
Sounds fine as we are passing a pointer to the struct payload which satisfies pr.Payload.
A simple better change would be to make payload as lower case at line as we are anywayz assigning it to an interface and need not be exported.It helps in understanding as well.What do you think ?
Making it private SGTM assuming we don't need it anywhere else. Can you open a PR?
@ruflin Sure.Will open.