提交 b353f75e 作者: Brian Tiger Chow

docs(tour) comment Chapter func

上级 b2323afe
......@@ -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))
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论