August 2016
Beginner to intermediate
665 pages
14h 11m
English
The wonderful thing with Go when it comes to best practices is that even if you don't necessarily do everything right, either Go will yell at you or provide you with the tools necessary to fix it.
If you attempt to include code and not use it, or if you attempt to initialize a variable and not use it, Go will stop you. If you want to clean up your code's formatting, Go enables it with go fmt.
One of the easiest things you can do when building a package from scratch is to structure your code directories in an idiomatic way. The standard for a new package would look something like the following code:
/projects/
thisproject/
bin/
pkg/
src/
package/
mypackage.goSetting up your Go code like this is not just ...
Read now
Unlock full access