DEV Community

loading...

Discussion on: Variable Declarations in Go

Collapse
forstmeier profile image
John Forstmeier Author

I like that piece particularly this bit at the end:

In general, short variable declarations should be preferred because they are more concise than regular variable declarations/assignments.

I tend to agree with that sentiment given that := is only available inside a function, which seems to indicate it is the preferred method. var is still an option which is my primary hangup.