diff --git a/tour/all.go b/tour/all.go index 723249a1e7c96d23e4e66020add3ea6fbf947e51..b09bd92369952cf311329e9e36bb8d5a9dcec0ea 100644 --- a/tour/all.go +++ b/tour/all.go @@ -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))