mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-26 15:42:21 +08:00
docs(tour) chapter
This commit is contained in:
@ -2,13 +2,13 @@ package tour
|
|||||||
|
|
||||||
import "fmt"
|
import "fmt"
|
||||||
|
|
||||||
// sections within.
|
// returns a partially applied function.
|
||||||
//
|
//
|
||||||
// It's designed to make it easy to re-order chapters with minimal fuss.
|
// It's designed to make it easy to re-order chapters with minimal fuss.
|
||||||
//
|
//
|
||||||
// eg.
|
// eg.
|
||||||
// Intro := Chapter(1)
|
// Intro := Chapter(1)
|
||||||
// ID("1.1") == Intro(1)
|
// ID("1.1") == Intro(1) == Chapter(1)(1)
|
||||||
func Chapter(number int) func(topic int) ID {
|
func Chapter(number int) func(topic int) ID {
|
||||||
return func(topic int) ID {
|
return func(topic int) ID {
|
||||||
return ID(fmt.Sprintf("%d.%d", number, topic))
|
return ID(fmt.Sprintf("%d.%d", number, topic))
|
||||||
|
Reference in New Issue
Block a user