This repository has been archived by the owner on Jan 9, 2019. It is now read-only.
forked from miekg/gobook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
go_a4.tex
196 lines (168 loc) · 4.06 KB
/
go_a4.tex
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
\documentclass[a4paper,twoside,openleft]{blocksbook}
\usepackage[cm-default]{fontspec}% provides font selecting commands
\usepackage{xunicode}% provides unicode character macros
\usepackage{xltxtra} % provides some fixes/extras
\usepackage[answerdelayed,lastexercise]{exercise}
\usepackage[labelsep=period,labelfont=it,textfont=it]{caption}
\usepackage{alltt}
\usepackage{url}
\usepackage{listings}
\usepackage{color}
\usepackage{graphicx}
\usepackage{relsize}
\usepackage{xCJK}
\usepackage{scalefnt}
\usepackage{wrapfig}
\usepackage{everypage}
% Tables from Gnumeric.
\usepackage{array}
\usepackage{longtable}
\usepackage{calc}
\usepackage{multirow}
\usepackage{hhline}
\usepackage{ifthen}
\usepackage{upquote}
\usepackage{tikz}
\usetikzlibrary{arrows,decorations.pathreplacing}
\usepackage{float}
%\usepackage{natbib}
%% Local tex stuff.
\usepackage{coderemarks}
%% Must go last.
\usepackage{hyperref}
\input{go-setup.tex}
\input{go-cc-license.tex}
\begin{document}
\thispagestyle{empty}
\newcommand{\version}{1.0}
%% Title page.
\begin{center}
\hspace{1.0cm}{\scalefont{6.00}{\sffamily{\mbox{\vspace{1.0cm}Learning Go}}}}\\
\vspace{0.5cm}
{\scalefont{3.0}\sffamily{Go 1}}
\end{center}
\vspace*{2cm}
\begin{figure}[h!]
\begin{center}
\includegraphics[scale=0.65]{fig/bumper-inverse.png}
\end{center}
\end{figure}
\vspace*{0.02\stockheight}
\begin{minipage}{0.4\textwidth}
\begin{flushleft} \large
\hspace*{2,0cm}Author:\\
\hspace*{2.0cm}\emph{Miek Gieben}\\
\vfill
\end{flushleft}
\end{minipage}
\hspace{5mm}
\begin{minipage}{0.4\textwidth}
\begin{flushright} \large
Thanks to:\\
\emph{Go Authors}, \emph{Google}\\
\vfill
\end{flushright}
\end{minipage}
\vspace*{0.5cm}
\begin{center}
With the help and contributions from:
({\small in alphabetical order})
\input{go-contributors.tex}
\end{center}
\vfill
\begin{center}
\hspace*{1cm}\CcGroupByNcSa{0.83}{0.95ex}\\[2.5ex]
\hspace*{1cm}{\tiny\CcNote{\CcLongnameByNcSa}}
\end{center}
\begin{center}
\hspace*{1cm}\emph{Miek Gieben -- \copyright 2010 - 2012}
\end{center}
\vspace{-3em}
%% End title page.
\newpage
\thispagestyle{empty}
\begin{figure}[H]
\begin{center}
\emph{
This work is licensed under the Attribution-NonCommercial-ShareAlike 3.0 Unported License. To
view a copy of this license, visit \url{http://creativecommons.org/licenses/by-nc-sa/3.0/}
or send a letter
to Creative Commons, 171 Second Street, Suite 300, San Francisco, California, 94105, USA.}
\vspace{2em}
\emph{All example code used in this book is hereby put in the public domain.}
\end{center}
\end{figure}
\begin{center}
``Learning Go'' has been translated into:
\begin{itemize}
\item Chinese, by Xing Xing,
\begin{cjkc}
这里是中文译本
\end{cjkc}.
\url{http://www.mikespook.com/learning-go/}
\item Russian, by Michael Davydenko and is coming soon\texttrademark.
\end{itemize}
\end{center}
\begin{center}
\vfill
\emph{Learning as we Go}
(\emph{\version})
\tiny{Supports the Go 1 release}
\vspace{.2\stockheight}
\end{center}
\clearpage
\pagenumbering{roman}
\tableofcontents*
\listoffigures*
%%\listoftables* %% there are so few
\listofcode*
\listofex*
\clearpage
\chapter*{Preface}
\label{chap:preface}
\input{go-preface.tex}
\chapter{Introduction}
\pagenumbering{arabic}
\label{chap:intro}
\input{go-intro.tex}
\chapter{Basics}
\label{chap:basics}
\input{go-basics.tex}
\chapter{Functions}
\label{chap:functions}
\input{go-functions.tex}
\chapter{Packages}
\label{chap:packages}
\input{go-packages.tex}
\chapter{Beyond the basics}
\label{chap:beyond}
\input{go-beyond.tex}
\chapter{Interfaces}
\label{chap:interfaces}
\input{go-interfaces.tex}
\chapter{Concurrency}
\label{chap:channels}
\input{go-channels.tex}
\chapter{Communication}
\label{chap:communication}
\input{go-communication.tex}
%%\chapter{Miscellaneous}
%%\label{chap:miscellaneous}
%%\input{go-misc.tex}
\appendix
\chapter{Colophon}
\input{go-colophon}
\begin{twocolumn}
\chapter{Index}
\printindex
\end{twocolumn}
\begin{onecolumn}
\bibliographystyle{plain}
\bibliography{go}
\newpage
\thispagestyle{empty}
\begin{center}
\emph{This page is intentionally left blank.}
\end{center}
\end{onecolumn}
\end{document}