A complete introduction into Go, superseded by https://github.com/miekg/learninggo
Switch branches/tags
Nothing to show
Clone or download
Latest commit 88a59de Sep 30, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin Fixes from the code checker Oct 24, 2010
creative_commons start new repo May 9, 2010
ex-basics Tweaks to make it better May 17, 2014
ex-beyond Fix the cat exercise, thanks to Stefan Schroede Dec 7, 2013
ex-channels update exercises Jul 22, 2012
ex-communication some more changes May 17, 2014
ex-functions layout fixes Feb 2, 2013
ex-interfaces Remove this unfinished section May 17, 2014
ex-intro Cleanups Nov 6, 2013
ex-packages Gofmt the code Apr 20, 2013
ex-unsorted Drop the exercise chapter, put remaining stuff in last chapter Jan 31, 2011
fig fix brace alignment Nov 9, 2013
fonts More sourcecode pro bold font Jan 31, 2013
src Partial stuff added Dec 7, 2013
tab its a builtin function. duh! Jun 12, 2013
.gitignore Add intermediate files generated by make to ignore list Sep 6, 2012
Makefile Remove kindle - didnt look right - I dont have the time Feb 1, 2013
README.mkd Update README.mkd Sep 29, 2018
about-miekg.tex fix repo name Aug 29, 2012
blocksbook.cls smaller line Nov 14, 2013
coderemarks.sty Fiddle about with the circle size Nov 9, 2013
draft.tex erbij Jun 2, 2010
go-basics.tex Tweaks to make it better May 17, 2014
go-beyond.tex More tweaks and some deletions May 17, 2014
go-cc-license.tex Normalize line endings Aug 28, 2012
go-channels.tex Remove this unfinished section May 17, 2014
go-colophon.tex add file for smaller nits Oct 20, 2012
go-communication.tex Fix for misspelling in Chapter 8 Oct 15, 2012
go-contributors.tex Add Alexey Chernenkov and some of his proposed changes. Nov 9, 2013
go-functions.tex Tweaks to make it better May 17, 2014
go-interfaces.tex Remove this unfinished section May 17, 2014
go-nits-contributors.tex Add coderemark here too as spotted by Marco Ynema Nov 14, 2013
go-packages.tex Fix ref Nov 9, 2013
go-preface.tex Assume that Go is installed Nov 7, 2013
go-setup.tex Tweaks to make it better May 17, 2014
go.bib add fabian Jul 20, 2012
go.tex layout fixes Feb 1, 2013
go_a4.tex Some fixes Nov 7, 2013
todo.tex remove stuff I will never do Jun 12, 2013


"Learning Go" is now available online.

See https://miek.nl/go and this github repo.

Note this book's source has been rewritten in mmark and that source is available at https://github.com/miekg/learninggo.


Learning Go - a free PDF for learning the Go language.

The book currently consists of the following chapters:

  1. Introduction: Details the lineage of the language Go and shows the types, variables and control structures.
  2. Functions: How to make and use functions.
  3. 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.
  4. Beyond the basics: Learn how to create your own data types and define functions on them (called methods in Go).
  5. Interfaces: Go does not support Object Orientation in the traditional sense. In Go the central concept is interfaces.
  6. Concurrency: With the go keyword functions can be started in separate routines (called goroutines). Communication with these goroutines is done via channels.
  7. Communication : How to create/read/write from and to files. And how to do networking.

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.

Building the book

Package Prerequisites

When building this book from LaTeX sources files you will need the following packages on Ubuntu (tested on 13.04).

  • inkscape
  • gnumeric
  • ttf-droid
  • ttf-dejavu
  • ttf-sazanami-gothic (Japanese font)
  • ttf-arphic-ukai
  • texlive-fonts-recommended
  • texlive-extra-utils
  • texlive-xetex
  • texlive-latex-extra
  • texlive-latex-recommended
  • git-core
  • GNU make

Following is a shell script to automate the package prerequisites installation.

You can copy and paste the following code to your vt100 session to kickoff the chains of many packages installation.

# tested on Ubuntu 13.04
for i in inkscape \
gnumeric \
ttf-droid \
ttf-dejavu \
ttf-sazanami-gothic \
ttf-arphic-ukai \
texlive-fonts-recommended \
texlive-extra-utils \
texlive-xetex \
texlive-latex-extra \
texlive-latex-recommended \
latex-cjk-xcjk \
git-core \
sudo apt-get install $i -y

Checking out the Learning Go LaTeX sources.

Using http protocol.

me@ubuntu1204:~$git clone https://github.com/miekg/gobook.git
Cloning into 'gobook'...
remote: Counting objects: 4515, done.
remote: Compressing objects: 100% (1385/1385), done.
remote: Total 4515 (delta 3106), reused 4512 (delta 3104)
Receiving objects: 100% (4515/4515), 1.53 MiB | 1.17 MiB/s, done.
Resolving deltas: 100% (3106/3106), done.

Using git protocol if you already have github account setup.

git clone git@github.com:tjyang/gobook.git

Make the Learning Go Book


Download the prebuilt Learning Go book

Latest prebuilt pdf book [can be downloaded from http://www.miek.nl/downloads/Go/] 1