Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

A complete introduction into Go

branch: master

update paths

latest commit d9e378e2db
Miek Gieben authored
Octocat-spinner-32 bin Fixes from the code checker October 24, 2010
Octocat-spinner-32 creative_commons start new repo May 09, 2010
Octocat-spinner-32 ex-basics Make it exactly like a for-loop November 09, 2013
Octocat-spinner-32 ex-beyond Fix the cat exercise, thanks to Stefan Schroede December 07, 2013
Octocat-spinner-32 ex-channels update exercises July 22, 2012
Octocat-spinner-32 ex-communication Merge pull request #36 from simoc/master October 11, 2012
Octocat-spinner-32 ex-functions layout fixes February 02, 2013
Octocat-spinner-32 ex-interfaces spelling fixes in Interfaces chapter May 14, 2013
Octocat-spinner-32 ex-intro Cleanups November 06, 2013
Octocat-spinner-32 ex-packages Gofmt the code April 20, 2013
Octocat-spinner-32 ex-unsorted Drop the exercise chapter, put remaining stuff in last chapter January 31, 2011
Octocat-spinner-32 fig fix brace alignment November 09, 2013
Octocat-spinner-32 fonts More sourcecode pro bold font January 31, 2013
Octocat-spinner-32 src Partial stuff added December 07, 2013
Octocat-spinner-32 tab its a builtin function. duh! June 12, 2013
Octocat-spinner-32 .gitignore Add intermediate files generated by make to ignore list September 06, 2012
Octocat-spinner-32 Makefile Remove kindle - didnt look right - I dont have the time February 01, 2013
Octocat-spinner-32 README.mkd update paths January 23, 2014
Octocat-spinner-32 about-miekg.tex fix repo name August 29, 2012
Octocat-spinner-32 blocksbook.cls smaller line November 14, 2013
Octocat-spinner-32 coderemarks.sty Fiddle about with the circle size November 09, 2013
Octocat-spinner-32 draft.tex erbij June 02, 2010
Octocat-spinner-32 go-basics.tex Partial stuff added December 07, 2013
Octocat-spinner-32 go-beyond.tex Add beginnings of text on composition November 11, 2013
Octocat-spinner-32 go-cc-license.tex Normalize line endings August 28, 2012
Octocat-spinner-32 go-channels.tex Remove todos February 01, 2013
Octocat-spinner-32 go-colophon.tex add file for smaller nits October 20, 2012
Octocat-spinner-32 go-communication.tex Fix for misspelling in Chapter 8 October 15, 2012
Octocat-spinner-32 go-contributors.tex Add Alexey Chernenkov and some of his proposed changes. November 09, 2013
Octocat-spinner-32 go-functions.tex Merge branch 'master' of github.com:miekg/gobook November 16, 2013
Octocat-spinner-32 go-interfaces.tex Add coderemark here too as spotted by Marco Ynema November 14, 2013
Octocat-spinner-32 go-nits-contributors.tex Add coderemark here too as spotted by Marco Ynema November 14, 2013
Octocat-spinner-32 go-packages.tex Fix ref November 09, 2013
Octocat-spinner-32 go-preface.tex Assume that Go is installed November 07, 2013
Octocat-spinner-32 go-setup.tex Make the fonts just right November 09, 2013
Octocat-spinner-32 go.bib add fabian July 20, 2012
Octocat-spinner-32 go.tex layout fixes February 01, 2013
Octocat-spinner-32 go_a4.tex Some fixes November 07, 2013
Octocat-spinner-32 todo.tex remove stuff I will never do June 12, 2013
README.mkd

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 \
make
do
sudo apt-get install $i -y
done

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.
me@ubuntu1204:~$

Using git protocol if you already have github account setup.

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

Make the Learning Go Book

make

Download the prebuilt Learning Go book

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

Something went wrong with that request. Please try again.