Sunday, June 29, 2014

Effective Go - The Go Programming Language

Effective Go - The Go Programming Language:
This document gives tips for writing clear, idiomatic Go code.
It augments the language specification, the Tour of Go, and How to Write Go Code,

How to Write Go Code - The Go Programming Language
Go code must (should?) be kept inside a workspace. A workspace is a directory hierarchy with three directories at its root:
  • src contains Go source files organized into packages (one package per directory),
  • pkg contains package objects, and
  • bin contains executable commands.
The go tool builds source packages and installs the resulting binaries to the pkg and bin directories.

For convenience, add the workspace's bin subdirectory to your PATH (on Windows: Environment Variable) 
Then can use "go run programName.go" and "go install programName.go"