1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-01 02:30:39 +08:00

docs(tour) comment Chapter func

This commit is contained in:
Brian Tiger Chow
2014-11-04 22:34:38 -08:00
parent b2323afedd
commit b353f75e21

View File

@ -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))