Chapter 1

Tutorial

A hands-on introduction to Go

✓ Write your first Go program ✓ Use command-line arguments ✓ Work with files and URLs
1
Dup1
Dup1 prints the text of each line that appears more than once in the standard input, preceded by its count.
p.8 +10 XP beginner
2
Dup2
Dup2 prints the count and text of lines that appear more than once in the input. It reads from stdin or from a list of named files.
p.10 +10 XP beginner
3
Dup3
Dup3 prints the count and text of lines that appear more than once in the named input files.
p.12 +10 XP beginner
4
Echo1
Echo1 prints its command-line arguments.
p.4 +10 XP beginner
5
Echo2
Echo2 prints its command-line arguments.
p.6 +10 XP beginner
6
Echo3
Echo3 prints its command-line arguments.
p.8 +10 XP beginner
7
Fetch
Fetch prints the content found at each specified URL.
p.16 +10 XP beginner
8
Fetchall
Fetchall fetches URLs in parallel and reports their times and sizes.
p.17 +10 XP beginner
9
Helloworld
Helloworld is our first Go program.
p.1 +10 XP beginner
10
Lissajous
Run with "web" command-line argument for web server. Lissajous generates GIF animations of random Lissajous figures.
p.13 +10 XP beginner
11
Server1
Server1 is a minimal "echo" server.
p.19 +10 XP beginner
12
Server2
Server2 is a minimal "echo" and counter server.
p.20 +10 XP beginner
13
Server3
Server3 is an "echo" server that displays request parameters.
p.21 +10 XP beginner