Example programs from "The Go Programming Language"
 
 
Go to file
Alan Donovan 1ae3ec6494 Add Go module 2021-10-04 11:48:05 -04:00
ch1 Update to gobook@27cf7b490526a0a0751ff12ed7cc4acd8afa2edc 2015-12-06 11:23:30 -05:00
ch2 ch2/popcount: show go1.7 SSA benchmarks 2016-12-06 17:57:29 -05:00
ch3 Update to gobook@5e58e0a92b96bee61856a8ce6e75ed849bd504af 2015-11-08 17:37:46 -05:00
ch4 Update to gobook@039ca5f7ddfb44bec546dbdc940c015d6e3912e6 2016-01-17 21:17:32 -05:00
ch5 Update to gobook@c6d7a22edd03e7738c38d5baa2174ff325d8d863 2015-10-28 14:20:59 -04:00
ch6 Update to gobook@4fdc3c0a831c14c716c2c013e42268f6d21a9a13 2015-12-07 12:23:42 -05:00
ch7 Use *lexer.describe in parse error message 2020-03-21 17:23:56 -07:00
ch8 Update to gobook@0a3e8d997823052c6a8575feca6e515ac6f8299d 2015-11-30 22:37:52 -05:00
ch9 Update to gobook@fbe1ed9c21e6645482a25ac4debe81bab4c4fde2 2016-10-12 17:24:55 -04:00
ch10 Update to gobook@c6d7a22edd03e7738c38d5baa2174ff325d8d863 2015-10-28 14:20:59 -04:00
ch11 Update to gobook@4e7af548bbfd4df6c667221ed120f05a06591fdf 2016-09-09 12:30:44 -04:00
ch12 Update to gobook@4fdc3c0a831c14c716c2c013e42268f6d21a9a13 2015-12-07 12:23:42 -05:00
ch13 Update to gobook@4e7af548bbfd4df6c667221ed120f05a06591fdf 2016-09-09 12:30:44 -04:00
CNAME Create CNAME 2019-10-21 15:41:12 -04:00
README.md remove warning about missing packages 2015-10-28 14:27:40 -04:00
go.mod Add Go module 2021-10-04 11:48:05 -04:00
go.sum Add Go module 2021-10-04 11:48:05 -04:00

README.md

The Go Programming Language

This repository provides the downloadable example programs for the book, "The Go Programming Language"; see http://www.gopl.io.

These example programs are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
Creative Commons License

You can download, build, and run the programs with the following commands:

$ export GOPATH=$HOME/gobook            # choose workspace directory
$ go get gopl.io/ch1/helloworld         # fetch, build, install
$ $GOPATH/bin/helloworld                # run
Hello, 世界

Many of the programs contain comments of the form //!+ and //!-. These comments bracket the parts of the programs that are excerpted in the book; you can safely ignore them. In a few cases, programs have been reformatted in an unnatural way so that they can be presented in stages in the book.