Documentation
¶
Overview ¶
Package protodoc extracts the JSON examples from docs/PROTOCOL.md so tests can bind every example to a typed value.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StripComments ¶
StripComments removes // and /* */ comments outside JSON strings.
Types ¶
type Block ¶
type Block struct {
Index int // 1-based, in document order
Line int // line of the opening fence
Text string // content, dedented by the fence indent
}
Block is one fenced json code block of the document.
func JSONBlocks ¶
JSONBlocks returns every fenced json block, including indented ones.
Click to show internal directories.
Click to hide internal directories.