Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 103 lines (76 sloc) 3.124 kB
2c40c1d @tjyang add more markdown syntax
tjyang authored
1 # `Learning Go` - a free E-Book for learning the Go language.
b570256 @miekg add markdown readme
authored
2
3
86f6af7 @tjyang add more markdown syntax
tjyang authored
4 The book currently consists of the following chapters:
b570256 @miekg add markdown readme
authored
5
ad5ea14 @tjyang use more markdown syntax
tjyang authored
6 1. Introduction: Show how to install Go and details the lineage of the language Go.
7 2. Basics: Types, variables and control structures.
8 3. Functions: How to make and use functions.
2b5495e @djotto 'is' -> 'are'
djotto authored
9 4. Packages: Functions and data are grouped together in packages. Here you will see how to make your own package. How to unit test your package is also described.
4ff339d @djotto plural
djotto authored
10 5. Beyond the basics: Learn how to create your own data types and define functions on them (called methods in Go).
ad5ea14 @tjyang use more markdown syntax
tjyang authored
11 6. Interfaces: Go does not support Object Orientation in the traditional sense. In Go the central concept is interfaces.
5ff4b29 @djotto plural fix
djotto authored
12 7. Concurrency: With the go keyword functions can be started in separate routines (called goroutines). Communication with these goroutines is done via channels.
ad5ea14 @tjyang use more markdown syntax
tjyang authored
13 8. Communication : How to create/read/write from and to files. And how to do networking.
b570256 @miekg add markdown readme
authored
14
f14062b @djotto unneeded word
djotto authored
15 Each chapter concludes with a number of exercises with answers to help you get some hands-on experience. Currently there are more than 30 exercises.
b570256 @miekg add markdown readme
authored
16
2bb6c25 @tjyang use more markdown syntax
tjyang authored
17 * See http://www.golang.org for the homepage of Go.
18 * [Learning Go Project page.] [2]
b570256 @miekg add markdown readme
authored
19
7d8275e @tjyang add more markdown syntax
tjyang authored
20
13e6d9e @tjyang add more markdown syntax
tjyang authored
21 ## Building the book
22
d33715d @tjyang add more markdown syntax
tjyang authored
23 ### Package Prerequisites
24
13e6d9e @tjyang add more markdown syntax
tjyang authored
25 When building this book from LaTeX sources files you will need the following packages on Ubuntu (tested on 12.04).
b570256 @miekg add markdown readme
authored
26
27 * `inkscape`
28 * `gnumeric`
29 * `ttf-droid`
a16c5ca @tjyang add more markdown syntax
tjyang authored
30 * `ttf-dejavu`
57c93d7 @miekg Try to put in chinese
authored
31 * `ttf-sazanami-gothic` (Japanese font)
13e6d9e @tjyang add more markdown syntax
tjyang authored
32 * `ttf-arphic-ukai`
b570256 @miekg add markdown readme
authored
33 * `texlive-fonts-recommended`
34 * `texlive-extra-utils`
35 * `texlive-xetex`
36 * `texlive-latex-extra`
37 * `texlive-latex-recommended`
13e6d9e @tjyang add more markdown syntax
tjyang authored
38 * `latex-cjk-xcjk` (Chinese font)
b570256 @miekg add markdown readme
authored
39 * `git-core`
a16c5ca @tjyang add more markdown syntax
tjyang authored
40 * `GNU make`
41
42
d33715d @tjyang add more markdown syntax
tjyang authored
43
d3e3c58 @tjyang add more markdown syntax
tjyang authored
44 ### Following is a shell script to automate the package prerequisites installation.
86f6af7 @tjyang add more markdown syntax
tjyang authored
45
d642128 @tjyang add more markdown syntax
tjyang authored
46 You can copy and paste the following code to your vt100 session to kickoff the chains of many packages installation.
a16c5ca @tjyang add more markdown syntax
tjyang authored
47 ```
d33715d @tjyang add more markdown syntax
tjyang authored
48 # tested on Ubuntu 12.04
a16c5ca @tjyang add more markdown syntax
tjyang authored
49 for i in inkscape \
50 gnumeric \
51 ttf-droid \
52 ttf-dejavu \
86f6af7 @tjyang add more markdown syntax
tjyang authored
53 ttf-sazanami-gothic \
54 ttf-arphic-ukai \
a16c5ca @tjyang add more markdown syntax
tjyang authored
55 texlive-fonts-recommended \
56 texlive-extra-utils \
57 texlive-xetex \
58 texlive-latex-extra \
59 texlive-latex-recommended \
86f6af7 @tjyang add more markdown syntax
tjyang authored
60 latex-cjk-xcjk \
a16c5ca @tjyang add more markdown syntax
tjyang authored
61 git-core \
ae4a3c9 @tjyang add more markdown syntax
tjyang authored
62 make \
a16c5ca @tjyang add more markdown syntax
tjyang authored
63 do
64 sudo apt-get install $i -y
65 done
66 ```
67
d642128 @tjyang add more markdown syntax
tjyang authored
68 ### Checking out the `Learning Go` LaTeX sources.
2c40c1d @tjyang add more markdown syntax
tjyang authored
69
70 Using http protocol.
b570256 @miekg add markdown readme
authored
71
d3e3c58 @tjyang add more markdown syntax
tjyang authored
72 ```
2c40c1d @tjyang add more markdown syntax
tjyang authored
73 me@ubuntu1204:~$git clone https://github.com/miekg/gobook.git
74 Cloning into 'gobook'...
75 remote: Counting objects: 4515, done.
76 remote: Compressing objects: 100% (1385/1385), done.
77 remote: Total 4515 (delta 3106), reused 4512 (delta 3104)
78 Receiving objects: 100% (4515/4515), 1.53 MiB | 1.17 MiB/s, done.
79 Resolving deltas: 100% (3106/3106), done.
80 me@ubuntu1204:~$
d3e3c58 @tjyang add more markdown syntax
tjyang authored
81 ```
82
2c40c1d @tjyang add more markdown syntax
tjyang authored
83 Using git protocol if you already have github account setup.
d3e3c58 @tjyang add more markdown syntax
tjyang authored
84
85 ```
2c40c1d @tjyang add more markdown syntax
tjyang authored
86 git clone git@github.com:tjyang/gobook.git
d3e3c58 @tjyang add more markdown syntax
tjyang authored
87 ```
88
2c40c1d @tjyang add more markdown syntax
tjyang authored
89
90 ### Make the `Learning Go` Book
d3e3c58 @tjyang add more markdown syntax
tjyang authored
91
92 ```
93 make
94 ```
95
2c40c1d @tjyang add more markdown syntax
tjyang authored
96 ### Download the prebuilt `Learning Go` book
f0caf38 @tjyang add more markdown syntax
tjyang authored
97
d642128 @tjyang add more markdown syntax
tjyang authored
98 Latest prebuilt pdf book [can be downloaded from http://www.miek.nl/files/go/] [1]
f0caf38 @tjyang add more markdown syntax
tjyang authored
99
100
2c40c1d @tjyang add more markdown syntax
tjyang authored
101 [1]: http://miek.nl/files/go/ "Download the prebuilt Learning Go book in PDF format"
00cc4fa @tjyang use more markdown syntax
tjyang authored
102 [2]: http://www.miek.nl/projects/learninggo/index.html "http://www.miek.nl/projects/learninggo/index.html"
Something went wrong with that request. Please try again.