Skip to content
Go by Example
Go CSS Shell Ruby HTML
Branch: master
Clone or download

Latest commit

mmcgrana Merge pull request #318 from mmcgrana/fix-context-typo
Fix typo in a comment of the context example
Latest commit 3f8e58a Jan 14, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples
public Fix typo in a comment of the context example Jan 13, 2020
templates Clean up merge Sep 1, 2019
tools bugfix (#294) sha1 sum calculator Oct 22, 2019
vendor/pygments Just use `python` for pygmentize shebang Dec 27, 2016
.gitattributes
.gitignore arrow keys navigation added | fixes #222 Jul 9, 2019
.travis.yml Combine testing environments on travis Jul 1, 2019
CONTRIBUTING.md Update CONTRIBUTING.md Jul 12, 2019
README.md Alphabetize Jan 9, 2020
examples.txt Rename to shorter context Jan 4, 2020

README.md

Go by Example

Content and build toolchain for Go by Example, a site that teaches Go via annotated example programs.

Overview

The Go by Example site is built by extracting code and comments from source files in examples and rendering them via the templates into a static public directory. The programs implementing this build process are in tools, along with some vendor'd dependencies in vendor.

The built public directory can be served by any static content system. The production site uses S3 and CloudFront, for example.

Building

Build Status

To build the site you'll need Go and Python installed. Run:

$ go get github.com/russross/blackfriday
$ tools/build

To build continuously in a loop:

$ tools/build-loop

To see the site locally:

$ tools/serve

and open http://127.0.0.1:8000/ in your browser.

Publishing

To upload the site:

$ gem install aws-sdk
$ export AWS_ACCESS_KEY_ID=...
$ export AWS_SECRET_ACCESS_KEY=...
$ tools/upload

License

This work is copyright Mark McGranaghan and licensed under a Creative Commons Attribution 3.0 Unported License.

The Go Gopher is copyright Renée French and licensed under a Creative Commons Attribution 3.0 Unported License.

Translations

Contributor translations of the Go by Example site are available in:

Thanks

Thanks to Jeremy Ashkenas for Docco, which inspired this project.

You can’t perform that action at this time.