Skip to content
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

Only initialize non-default struct values when creating an Issues struct. #31

Closed
lgarron opened this issue Mar 29, 2016 · 1 comment
Closed

Comments

@lgarron
Copy link
Collaborator

lgarron commented Mar 29, 2016

e.g.

Issues{Errors: []string{"First Error", "Second Error"}}

instead of

Issues{
  Errors:   []string{"First Error", "Second Error"},
  Warnings: []string{},
}
@lgarron
Copy link
Collaborator Author

lgarron commented Apr 19, 2016

I looked into this, and it wouldn't save use especially much code. Since these are mostly pasted from the output of (issues Issues) GoString(), they also don't take longer to write.

So, I'd rather leave these in, as Explicit is Better Than Implicit.

@lgarron lgarron closed this as completed Apr 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant