- Example 1 Faking Time
- Example 2 Faking File System
- Example 3 Faking The Network
- Example 4 Basic Type
- Example 5 Type Conversions
- Example 6 Numeric Constants
- Example 7 For
- Example 8 If
- Example 9 Exercise Loops 'n' Functions
- Example 10 Switch
- Example 11 Defer
- Example 12 Pointers Struct Arrays
- Example 13 Slices (see also relevant post on slices on golang's blog. For more slice tricks check here)
- Example 14 Maps (see also relevant post on maps on golang's blog )
- Example 15 Function Values Closures
- Example 16 Exercise Closures
- Example 17 Methods
- Example 18 Interfaces
- Example 19 Type Assertions
- Example 20 Stringers
- Example 21 Errors
- Example 22 Readers
- Example 23 Images
- Stateful vs. Stateless Architecture Overview
- Packages: By convention, the package name is the same as the last element of the import path. For instance, the "math/rand" package comprises files that begin with the statement package rand.
- Exported names: In Go, a name is exported if it begins with a capital letter. For example, Pizza is an exported name, as is Pi, which is exported from the math package.
- Functions: TR Go's declaration syntax article
- "Naked" return: A return statement without arguments returns the named return values of the function
- Basic Types
- Strings, bytes, runes and characters in Go (from
The Go Blog
)rune
: alias for int32 - represents a Unicode code point
- The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets
uintptr
?
- Strings, bytes, runes and characters in Go (from
- TR Defer, Panic, and Recover
- Slice literas
A slice literal is like an array literal without the length ?If I drop its first two values, can I re-gain them ?
- Test cases: package wc/func test ?
Git
:git add -u
,git rebase --skip
,git log -p
Vim
shortcuts: {$
:EOL,dd
:cut,p
:paste,x
:remove char,Ctrl+L
: clear bash screen
- Go/Playground: Example1 Faking Time ?
- Go/Playground: Example2 Faking File system ?
- Go/Playground: Example3 Faking the Network ?
- Note: Time in the Go playground always appears to start at 2009-11-10 23:00:00 UTC, a value whose significance is left as an exercise for the reader (Example_10) ?