• This repository has been archived on 22/Mar/2021
  • Stars
    star
    874
  • Rank 51,977 (Top 2 %)
  • Language
    TeX
  • Created over 13 years ago
  • Updated about 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A complete introduction into Go, superseded by https://github.com/miekg/learninggo

"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.

THIS REPO IS DEPRECATED.

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 [email protected]: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/] 1

More Repositories

1

dns

DNS library in Go
Go
7,925
star
2

learninggo

Learning Go Book in mmark
Go
541
star
3

gitopper

Gitops for non-Kubernetes folks
Go
380
star
4

pkcs11

pkcs11 wrapper for Go
Go
375
star
5

exdns

Go DNS example programs
Go
299
star
6

lean

Pretty, minimal, one-line, fast ZSH prompt
Shell
154
star
7

rdup

The only backup program that doesn't make backups!
C
106
star
8

unbound

A Go wrapper for libunbound
Go
101
star
9

pandoc2rfc

Use pandoc to create XML suitable for xml2rfc
Python
81
star
10

dinit

An init for use inside Docker containers
Go
67
star
11

skydns2

Development is taking place: https://github.com/skynetservices/skydns2
Go
63
star
12

dnsv2

Go
44
star
13

bgp

BGP implementation in Go
Go
41
star
14

xds

command line interface for Envoy xDS endpoint
Go
35
star
15

block

Proof of concept CoreDNS plugin that implements a block list
Go
23
star
16

yamlfmt

Format YAML
Go
21
star
17

dnsfs

A DNS filesystem
Go
21
star
18

redis

CoreDNS plugin implementing a shared cache using Redis
Go
14
star
19

bitradix

A radix tree that branches on the bits in a key
Go
14
star
20

dnsrouter

Route DNS packets
Go
14
star
21

dreck

Bot to help with GitHub chores
Go
12
star
22

pgo

container gitops in a simple way
Go
11
star
23

rip

RIP protocol implementation in Go
Go
10
star
24

lg-dns

DNS Looking Glass
Go
9
star
25

mutfs

A filesystem where you can create, but not alter files, imMUTable FS.
Go
8
star
26

dnsfmt

Auto format DNS zone files
Go
7
star
27

ssd

Go
6
star
28

nxdomain

CoreDNS plugin: return NXDOMAIN for configured domains
Go
6
star
29

dump

dump all incoming request in coredns
Go
5
star
30

lboverlay

Go
5
star
31

local

CoreDNS plugin that answers "local" queries
Go
5
star
32

caddy-debian

Create debian package for Caddy
Makefile
5
star
33

access

why - explain why a user can or cannot access a file
Go
5
star
34

cf

CFEngine formatter
Go
4
star
35

nsec4

authenticated denial of existence
Shell
4
star
36

denialid

Authenticated Denial of Existence in the DNS
XSLT
4
star
37

ebpf

ebpf compiler in Go; Write Go, get ebpf
Go
4
star
38

debian

Small CI to create debian packages for various (Go) binaries
Shell
3
star
39

nlgids

caddy middleware for nlgids.london
Go
2
star
40

a

2
star
41

ssh2prom

Prometheus metrics from openssh
Go
2
star
42

mmark.nl

mmark.miek.nl website
HTML
2
star
43

dname

HTML
2
star
44

coderemarks

Annotate source code with remarks in LaTeX
2
star
45

rota

generate oncall rotations
Go
2
star
46

kubeadam

TeX
1
star
47

xdoc

Go
1
star
48

corecheck

Utility to check Markdown files for valid Corefile snippets.
Go
1
star
49

signalds

1
star
50

caddy-user

Caddy module that changes to a different user before serving the request
Go
1
star