Chapter 7

Interfaces

Interface types and satisfaction

✓ Define interfaces ✓ Use type assertions
1
Bytecounter
Bytecounter demonstrates an implementation of io.Writer that counts bytes.
p.173 +15 XP intermediate
2
Eval
Example from The Go Programming Language
+15 XP intermediate
3
Http1
Http1 is a rudimentary e-commerce server.
p.191 +15 XP intermediate
4
Http2
Http2 is an e-commerce server with /list and /price endpoints.
p.192 +15 XP intermediate
5
Http3
Http3 is an e-commerce server that registers the /list and /price endpoints by calling (*http.ServeMux).Handle.
p.194 +15 XP intermediate
6
Http3a
Http3a is an e-commerce server that registers the /list and /price endpoints by calling (*http.ServeMux).HandleFunc.
p.195 +15 XP intermediate
7
Http4
Http4 is an e-commerce server that registers the /list and /price endpoint by calling http.HandleFunc.
p.195 +15 XP intermediate
8
Sleep
The sleep program sleeps for a specified period of time.
p.179 +15 XP intermediate
9
Sorting
Sorting sorts a music playlist into a variety of orders.
p.187 +15 XP intermediate
10
Surface
The surface program plots the 3-D surface of a user-provided function.
p.203 +15 XP intermediate
11
Tempconv
Package tempconv performs Celsius and Fahrenheit temperature computations.
p.180 +15 XP intermediate
12
Tempflag
Tempflag prints the value of its -temp (temperature) flag.
p.181 +15 XP intermediate
13
Xmlselect
Xmlselect prints the text of selected elements of an XML document.
p.214 +15 XP intermediate