internal/docsite/sidebars.go
internal/docsite · 101 lines · 7 declarations · source
Declarations
type sidebarItem
type sidebarItem struct {
Type string `json:"type"`
ID string `json:"id,omitempty"`
Label string `json:"label,omitempty"`
Link *sidebarLink `json:"link,omitempty"`
Collapsed *bool `json:"collapsed,omitempty"`
Items []*sidebarItem `json:"items,omitempty"`
}
type sidebarLink
type sidebarLink struct {
Type string `json:"type"`
ID string `json:"id"`
}
var partLine, entryLine, prefixLine
var (
partLine = regexp.MustCompile(`^#\s+(.+?)\s*$`)
entryLine = regexp.MustCompile(`^( *)- \[([^\]]+)\]\(([^)\s]+)\)\s*$`)
prefixLine = regexp.MustCompile(`^\[([^\]]+)\]\(([^)\s]+)\)\s*$`)
)
const referencePart
const referencePart = "Reference"
func sidebars
func sidebars(summary string) ([]byte, error)
func docID
func docID(target string) string
func boolPtr
func boolPtr(b bool) *bool