scenario
typescenario is one fixed pair of documents, chosen to show one property.
Value
v0.scenario
scenarios
[]v0.scenarioscenarios are deliberately fixed rather than caller-supplied: output that moves with the caller or the block height cannot be pinned by an example test, and this realm's whole job is to be comparable from one render to the next.
- OID
- 058620…8499:4
scenarios details
defaultContext
untyped bigintValue
(2 <untyped> bigint)
maxContext
untyped bigintValue
(6 <untyped> bigint)
realmPath
untyped stringValue
"/r/moul/x/daily/myersdiffdemo/v0"
Render
func(path string) stringRender implements the gnoweb view. - "" or "/" : the index, with every scenario summarized. - "/\<key>" : one scenario at the default context width. - "/\<key>/\<context>" : the same, with 0 to 6 lines of context.
- OID
- 058620…8499:9
Render details
parsePath
func(path string) (string, int)parsePath returns the scenario key and the context width. It never returns anything it was handed: the key is matched against the table by the caller and the width is an integer, clamped.
- OID
- 058620…8499:11
parsePath details
renderIndex
func() string- OID
- 058620…8499:12
renderIndex details
renderScenario
func(sc v0.scenario, context int) string- OID
- 058620…8499:13
renderScenario details
diffOf
func(sc v0.scenario) v0.Script- OID
- 058620…8499:14
diffOf details
applies
func(sc v0.scenario, s v0.Script) boolapplies is the demo asserting the library's own claim rather than repeating it: the rendered answer comes from running Apply, not from a constant.
- OID
- 058620…8499:15
applies details
lines
func(s string) []string- OID
- 058620…8499:16
lines details
yesNo
func(b bool) string- OID
- 058620…8499:17