/
main.go
69 lines (56 loc) · 1.43 KB
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package main
import (
"github.com/dmportella/golang-tutorial/chapter0"
"github.com/dmportella/golang-tutorial/chapter1"
"github.com/dmportella/golang-tutorial/chapter2"
"github.com/dmportella/golang-tutorial/chapter3"
"github.com/dmportella/golang-tutorial/chapter4"
"github.com/dmportella/golang-tutorial/chapter6"
"github.com/dmportella/golang-tutorial/chapter9"
"fmt"
)
// Build version of the binary
var Build string
// Revision number of the binary
var Revision string
// Branch name of the binary
var Branch string
func main() {
fmt.Printf("Golang tutorial version %s, branch %s at revision %s.\n\rDaniel Portella (c) 2016\n\r", Build, Branch, Revision)
chapter0.Printing()
chapter0.Variables()
chapter0.ForLoop()
chapter0.IfElse()
chapter0.Switches()
chapter0.Constants()
chapter1.Arrays()
chapter1.Slices()
chapter1.Maps()
chapter1.Range()
chapter1.VariableRedux()
chapter2.Functions()
chapter2.InLineFunctions()
chapter2.MultiReturn()
chapter2.Variadric()
chapter2.Closure()
chapter2.Recursion()
chapter2.Defering()
chapter2.StackingDefers()
chapter3.Pointers()
chapter3.Structures()
chapter3.Methods()
chapter3.Interfaces()
chapter3.Errors()
chapter3.Embedding()
chapter4.GoSimple()
chapter4.Waiting()
chapter4.Channels()
chapter4.Unbuffered()
chapter4.Synchronising()
chapter4.Directions()
chapter6.Selecting()
chapter6.Timeouts()
chapter6.Ranging()
chapter6.NonBlocking()
chapter9.Sockets()
}