Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(tour) content #269

Merged
merged 15 commits into from
Nov 5, 2014
Prev Previous commit
Next Next commit
docs(tour) comment Chapter func
Brian Tiger Chow committed Nov 5, 2014
commit b353f75e219f3de1cef84f51f3896c0d56444fdd
6 changes: 6 additions & 0 deletions tour/all.go
Original file line number Diff line number Diff line change
@@ -94,6 +94,12 @@ var FileBasicsMounting = Content{
`,
}

// Chapter is used to define a chapter once and derive IDs for any number of
// sections within.
//
// eg.
// Intro := Chapter(1)
// ID("1.1") == Intro(1)
func Chapter(number int) func(topic int) ID {
return func(topic int) ID {
return ID(fmt.Sprintf("%d.%d", number, topic))