-
Notifications
You must be signed in to change notification settings - Fork 514
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shouldn't payload be a pointer #75
Comments
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. |
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.
The text was updated successfully, but these errors were encountered: