doc

command
v0.0.0-...-f8c0f81 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2011 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

The template uses the function "code" to inject program source into the output by extracting code from files and injecting them as HTML-escaped <pre> blocks.

The syntax is simple: 1, 2, or 3 space-separated arguments:

Whole file:

{{code "foo.go"}}

One line (here the signature of main):

{{code "foo.go" `/^func.main/`}}

Block of text, determined by start and end (here the body of main):

{{code "foo.go" `/^func.main/` `/^}/`

Patterns can be `/regular expression/`, a decimal number, or "$" to signify the end of the file.

Directories

Path Synopsis
codelab
Generating random text: a Markov chain algorithm Based on the program presented in the "Design and Implementation" chapter of The Practice of Programming (Kernighan and Pike, Addison-Wesley 1999).
Generating random text: a Markov chain algorithm Based on the program presented in the "Design and Implementation" chapter of The Practice of Programming (Kernighan and Pike, Addison-Wesley 1999).
talks

Jump to

Keyboard shortcuts

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