Notes on Golangbot Golang tutorial series.
The primary focus of Golang is to make the development of highly available and scalable web apps simple and easy.
$ go help Go is a tool for managing Go source code. Usage: go command [arguments] The commands are: build compile packages and dependencies clean remove object files and cached files doc show documentation for package or symbol env print Go environment information bug start a bug report fix update packages to use new APIs fmt gofmt (reformat) package sources generate generate Go files by processing source get download and install packages and dependencies install compile and install packages and dependencies list list packages run compile and run Go program test test packages tool run specified go tool version print Go version vet report likely mistakes in packages Use "go help [command]" for more information about a command. Additional help topics: c calling between Go and C buildmode build modes cache build and test caching filetype file types gopath GOPATH environment variable environment environment variables importpath import path syntax packages package lists testflag testing flags testfunc testing functions Use "go help [topic]" for more information about that topic. $
var age [int] = 29
var width, height [int] = 100, 50
Go does not allow automatic type promotion or conversion – “type conversion.”
bool (&&, ||) string int8 int16 int32 int64 int (32 or 64 depending) uint8 uint16 uint32 uint64 uint (32 or 64 depending) uintptr float32 float64 complex64 complex128 byte // alias for uint8 rune // alias for int32
%T printf format specifier prints the type of something.
const i = 42
constmust be known at compile time; cannot require any function execution.
const typedhello string = "Hello World"