Chapter 3

Basic Data Types

Integers, floats, strings, and constants

✓ Work with numeric types ✓ Manipulate strings
1
Basename1
Basename1 reads file names from stdin and prints the base name of each one.
p.72 +10 XP beginner
2
Basename2
Basename2 reads file names from stdin and prints the base name of each one.
p.72 +10 XP beginner
3
Comma
Comma prints its argument numbers with a comma at each power of 1000. Example: $ go build gopl.io/ch3/comma $ ./comma 1 12 123 1234 1234567890 1 12 123 1,234 1,234,567,890
p.73 +10 XP beginner
4
Mandelbrot
Mandelbrot emits a PNG image of the Mandelbrot fractal.
p.61 +10 XP beginner
5
Netflag
Netflag demonstrates an integer type used as a bit field.
p.77 +10 XP beginner
6
Printints
Printints demonstrates the use of bytes.Buffer to format a string.
p.74 +10 XP beginner
7
Surface
Surface computes an SVG rendering of a 3-D surface function.
p.58 +10 XP beginner