Chapter 4

Composite Types

Arrays, slices, maps, and structs

✓ Use arrays and slices ✓ Work with maps ✓ Define structs
1
Append
Append illustrates the behavior of the built-in append function.
p.88 +15 XP intermediate
2
Autoescape
Autoescape demonstrates automatic HTML escaping in html/template.
p.117 +15 XP intermediate
3
Charcount
Charcount computes counts of Unicode characters.
p.97 +15 XP intermediate
4
Dedup
Dedup prints only one instance of each line; duplicates are removed.
p.96 +15 XP intermediate
5
Embed
Embed demonstrates basic struct embedding.
p.106 +15 XP intermediate
6
Github
Package github provides a Go API for the GitHub issue tracker. See https://developer.github.com/v3/search/#search-issues.
p.110 +15 XP intermediate
7
Graph
Graph shows how to use a map of maps to represent a directed graph.
p.99 +15 XP intermediate
8
Issues
Issues prints a table of GitHub issues matching the search terms.
p.112 +15 XP intermediate
9
Issueshtml
Issueshtml prints an HTML table of issues matching the search terms.
p.115 +15 XP intermediate
10
Issuesreport
Issuesreport prints a report of issues matching the search terms.
p.113 +15 XP intermediate
11
Movie
Movie prints Movies as JSON.
p.108 +15 XP intermediate
12
Nonempty
Nonempty is an example of an in-place slice algorithm.
p.91 +15 XP intermediate
13
Rev
Rev reverses a slice.
p.86 +15 XP intermediate
14
Sha256
The sha256 command computes the SHA256 hash (an array) of a string.
p.83 +15 XP intermediate
15
Treesort
Package treesort provides insertion sort using an unbalanced binary tree.
p.101 +15 XP intermediate