Documentation
¶
Overview ¶
Package pitfall owns authored pitfall identity and source semantics.
Index ¶
- Constants
- func AllocateSlug(title string, used map[string]bool) (string, error)
- func EqualTitle(a, b string) bool
- func EscapeHeading(title string) string
- func EscapeLinkLabel(title string) string
- func EscapeTableCell(s string) string
- func EscapeTitle(title string) string
- func Serialize(e Entry) ([]byte, error)
- type Corpus
- type Entry
- type SourceFile
Constants ¶
View Source
const SourceDir = ".awf/docs/pitfalls"
Variables ¶
This section is empty.
Functions ¶
func AllocateSlug ¶
AllocateSlug chooses the first free deterministic ASCII slug.
func EqualTitle ¶
EqualTitle applies Go simple Unicode folding after Unicode whitespace collapse.
func EscapeHeading ¶
func EscapeLinkLabel ¶
func EscapeTableCell ¶
func EscapeTitle ¶
Types ¶
type Corpus ¶
type Corpus struct {
// contains filtered or unexported fields
}
func Load ¶
func Load(files []SourceFile) (Corpus, error)
Load parses and validates a complete injected direct-leaf source set.
type Entry ¶
type Entry struct {
Slug, SourcePath, Title string
Domains, Tags []string
Related []int
Body string
Source []byte
}
func Parse ¶
func Parse(f SourceFile) (Entry, error)
type SourceFile ¶
Click to show internal directories.
Click to hide internal directories.