gopl

module
v0.0.0-...-8cd4330 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2018 License: MIT

README

gopl

Exercises of "The Go Programming Language"

The Sample Codes of this book.

List of Exercises

Directories

Path Synopsis
ch01
ex1.01
Exercise 1.1 Echo to print command name itself
Exercise 1.1 Echo to print command name itself
ex1.02
Exercise 1.2 Echo to print index and value one per line
Exercise 1.2 Echo to print index and value one per line
ex1.03
Exercise 1.2 Test echo performance
Exercise 1.2 Test echo performance
ex1.04
Dup2 prints the count and text of lines that appear more than once in the input.
Dup2 prints the count and text of lines that appear more than once in the input.
ex1.05
Lissajous generates GIF animations of random Lissajous figures.
Lissajous generates GIF animations of random Lissajous figures.
ex1.06
Lissajous generates GIF animations of random Lissajous figures.
Lissajous generates GIF animations of random Lissajous figures.
ex1.07
Fetch prints the content found at each specified URL.
Fetch prints the content found at each specified URL.
ex1.08
Fetch prints the content found at each specified URL.
Fetch prints the content found at each specified URL.
ex1.09
Fetch prints the content found at each specified URL.
Fetch prints the content found at each specified URL.
ex1.10
Fetchall fetches URLs in parallel and reports their times and sizes.
Fetchall fetches URLs in parallel and reports their times and sizes.
ex1.11
Fetchall fetches URLs in parallel and reports their times and sizes.
Fetchall fetches URLs in parallel and reports their times and sizes.
ex1.12
Lissajous generates GIF animations of random Lissajous figures.
Lissajous generates GIF animations of random Lissajous figures.
ch02
ch03
ex3.01
Surface computes an SVG rendering of a 3-D surface function.
Surface computes an SVG rendering of a 3-D surface function.
ex3.02
Surface computes an SVG rendering of a 3-D surface function.
Surface computes an SVG rendering of a 3-D surface function.
ex3.03
Surface computes an SVG rendering of a 3-D surface function.
Surface computes an SVG rendering of a 3-D surface function.
ex3.04
Surface computes an SVG rendering of a 3-D surface function.
Surface computes an SVG rendering of a 3-D surface function.
ex3.05
Mandelbrot emits a PNG image of the Mandelbrot fractal.
Mandelbrot emits a PNG image of the Mandelbrot fractal.
ex3.06
Mandelbrot emits a PNG image of the Mandelbrot fractal.
Mandelbrot emits a PNG image of the Mandelbrot fractal.
ex3.07
Mandelbrot emits a PNG image of the Mandelbrot fractal.
Mandelbrot emits a PNG image of the Mandelbrot fractal.
ex3.08
Mandelbrot emits a PNG image of the Mandelbrot fractal.
Mandelbrot emits a PNG image of the Mandelbrot fractal.
ex3.09
Mandelbrot emits a PNG image of the Mandelbrot fractal.
Mandelbrot emits a PNG image of the Mandelbrot fractal.
ch04
ex4.08
Charcount computes counts of Unicode characters.
Charcount computes counts of Unicode characters.
ex4.10
Package github provides a Go API for the GitHub issue tracker.
Package github provides a Go API for the GitHub issue tracker.
ex4.11
Package github provides a Go API for the GitHub issue tracker.
Package github provides a Go API for the GitHub issue tracker.
ex4.14
Package github provides a Go API for the GitHub issue tracker.
Package github provides a Go API for the GitHub issue tracker.
ch05
ex5.01
Findlinks1 prints the links in an HTML document read from standard input.
Findlinks1 prints the links in an HTML document read from standard input.
ex5.04
Findlinks1 prints the links in an HTML document read from standard input.
Findlinks1 prints the links in an HTML document read from standard input.
ex5.06
Surface computes an SVG rendering of a 3-D surface function.
Surface computes an SVG rendering of a 3-D surface function.
ex5.10
The toposort program prints the nodes of a DAG in topological order.
The toposort program prints the nodes of a DAG in topological order.
ex5.11
The toposort program prints the nodes of a DAG in topological order.
The toposort program prints the nodes of a DAG in topological order.
ex5.12
Outline prints the outline of an HTML document tree.
Outline prints the outline of an HTML document tree.
ex5.13
Findlinks3 crawls the web, starting with the URLs on the command line.
Findlinks3 crawls the web, starting with the URLs on the command line.
ex5.18
Fetch saves the contents of a URL into a local file.
Fetch saves the contents of a URL into a local file.
ch06
ex6.01
Package intset provides a set of integers based on a bit vector.
Package intset provides a set of integers based on a bit vector.
ex6.02
Package intset provides a set of integers based on a bit vector.
Package intset provides a set of integers based on a bit vector.
ex6.03
Package intset provides a set of integers based on a bit vector.
Package intset provides a set of integers based on a bit vector.
ex6.04
Package intset provides a set of integers based on a bit vector.
Package intset provides a set of integers based on a bit vector.
ex6.05
Package intset provides a set of integers based on a bit vector.
Package intset provides a set of integers based on a bit vector.
ch07
ex7.01
Bytecounter demonstrates an implementation of io.Writer that counts bytes.
Bytecounter demonstrates an implementation of io.Writer that counts bytes.
ex7.03
Package treesort provides insertion sort using an unbalanced binary tree.
Package treesort provides insertion sort using an unbalanced binary tree.
ex7.06
Tempflag prints the value of its -temp (temperature) flag.
Tempflag prints the value of its -temp (temperature) flag.
ex7.07
Tempflag prints the value of its -temp (temperature) flag.
Tempflag prints the value of its -temp (temperature) flag.
ex7.08
Sorting sorts a music playlist into a variety of orders.
Sorting sorts a music playlist into a variety of orders.
ex7.09
Sorting sorts a music playlist into a variety of orders.
Sorting sorts a music playlist into a variety of orders.
ex7.11
Http4 is an e-commerce server that registers the /list and /price endpoint by calling http.HandleFunc.
Http4 is an e-commerce server that registers the /list and /price endpoint by calling http.HandleFunc.
ex7.12
Http4 is an e-commerce server that registers the /list and /price endpoint by calling http.HandleFunc.
Http4 is an e-commerce server that registers the /list and /price endpoint by calling http.HandleFunc.
ex7.13
Package eval provides an expression evaluator.
Package eval provides an expression evaluator.
ex7.14
Package eval provides an expression evaluator.
Package eval provides an expression evaluator.
ex7.16
Evaluate an expression for http clients, accepting `expr` and `env` as query parameters, eg: curl 'localhost:8000/?expr=x*y&env=x=3%20y=4'
Evaluate an expression for http clients, accepting `expr` and `env` as query parameters, eg: curl 'localhost:8000/?expr=x*y&env=x=3%20y=4'
ch08
ex8.02
RFC959 simple ftpd
RFC959 simple ftpd
ex8.03
Netcat is a simple read/write client for TCP servers.
Netcat is a simple read/write client for TCP servers.
ex8.03/reverb1
Reverb1 is a TCP server that simulates an echo.
Reverb1 is a TCP server that simulates an echo.
ex8.04
Reverb2 is a TCP server that simulates an echo.
Reverb2 is a TCP server that simulates an echo.
ex8.05
Mandelbrot emits a PNG image of the Mandelbrot fractal.
Mandelbrot emits a PNG image of the Mandelbrot fractal.
ex8.06
Crawl3 crawls web links starting with the command-line arguments.
Crawl3 crawls web links starting with the command-line arguments.
ex8.08
Reverb2 is a TCP server that simulates an echo.
Reverb2 is a TCP server that simulates an echo.
ex8.09
The du4 command computes the disk usage of the files in a directory.
The du4 command computes the disk usage of the files in a directory.
ex8.12
Chat is a server that lets clients chat with each other.
Chat is a server that lets clients chat with each other.
ex8.13
Chat is a server that lets clients chat with each other.
Chat is a server that lets clients chat with each other.
ex8.14
Chat is a server that lets clients chat with each other.
Chat is a server that lets clients chat with each other.
ex8.15
Chat is a server that lets clients chat with each other.
Chat is a server that lets clients chat with each other.
ch09
ex9.01
Package bank provides a concurrency-safe bank with one account.
Package bank provides a concurrency-safe bank with one account.
ex9.03
Package memo provides a concurrency-safe non-blocking memoization of a function.
Package memo provides a concurrency-safe non-blocking memoization of a function.
ex9.06
Mandelbrot emits a PNG image of the Mandelbrot fractal.
Mandelbrot emits a PNG image of the Mandelbrot fractal.
ch10
ex10.03
Fetch prints the content found at each specified URL.
Fetch prints the content found at each specified URL.
ch11
ex11.01
Charcount computes counts of Unicode characters.
Charcount computes counts of Unicode characters.
ex11.03
Package word provides utilities for word games.
Package word provides utilities for word games.
ex11.04
Package word provides utilities for word games.
Package word provides utilities for word games.
ch12
ex12.01
Package display provides a means to display structured data.
Package display provides a means to display structured data.
ex12.02
Package display provides a means to display structured data.
Package display provides a means to display structured data.
ex12.03
Package sexpr provides a means for converting Go objects to and from S-expressions.
Package sexpr provides a means for converting Go objects to and from S-expressions.
ex12.04
Package sexpr provides a means for converting Go objects to and from S-expressions.
Package sexpr provides a means for converting Go objects to and from S-expressions.
ex12.06
Package sexpr provides a means for converting Go objects to and from S-expressions.
Package sexpr provides a means for converting Go objects to and from S-expressions.
ex12.07
Package sexpr provides a means for converting Go objects to and from S-expressions.
Package sexpr provides a means for converting Go objects to and from S-expressions.
ex12.08
Package sexpr provides a means for converting Go objects to and from S-expressions.
Package sexpr provides a means for converting Go objects to and from S-expressions.
ex12.09
Package sexpr provides a means for converting Go objects to and from S-expressions.
Package sexpr provides a means for converting Go objects to and from S-expressions.
ex12.10
Package sexpr provides a means for converting Go objects to and from S-expressions.
Package sexpr provides a means for converting Go objects to and from S-expressions.
ex12.11
Package params provides a reflection-based parser for URL parameters.
Package params provides a reflection-based parser for URL parameters.
ex12.12
Package params provides a reflection-based parser for URL parameters.
Package params provides a reflection-based parser for URL parameters.
ex12.13
Package sexpr provides a means for converting Go objects to and from S-expressions.
Package sexpr provides a means for converting Go objects to and from S-expressions.
ch13
ex13.01
Package equal provides a deep equivalence relation for arbitrary values.
Package equal provides a deep equivalence relation for arbitrary values.
ex13.03
Package bzip provides a writer that uses bzip2 compression (bzip.org).
Package bzip provides a writer that uses bzip2 compression (bzip.org).
Generage Exercises.md run 'go run utils/combine.go -o Exercises.md' under root
Generage Exercises.md run 'go run utils/combine.go -o Exercises.md' under root

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL