Skip to content
Snippets Groups Projects
Commit b353f75e authored by Brian Tiger Chow's avatar Brian Tiger Chow
Browse files

docs(tour) comment Chapter func

parent b2323afe
Branches
No related tags found
1 merge request!1New
......@@ -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))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment