We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
type T struct { a, b int } func f() *T { return new(T) } func g() *T { return &T{} }
f just calls newobject and returns the result. g calls newobject, writes two zeros to the result, then returns it. Those zero writes are unnecessary.
f
newobject
g
The text was updated successfully, but these errors were encountered:
Previously reported here: #15199
Sorry, something went wrong.
Closing as duplicate.
No branches or pull requests
f
just callsnewobject
and returns the result.g
callsnewobject
, writes two zeros to the result, then returns it. Those zero writes are unnecessary.The text was updated successfully, but these errors were encountered: