Added custom printers

This commit is contained in:
Leon Mika 2024-12-11 22:30:14 +11:00
parent 62724e3f37
commit 7a92eeddac
7 changed files with 287 additions and 63 deletions

View file

@ -33,6 +33,11 @@ func main() {
It then terminates.
`,
})
instRepl.SetCommand("new-fancy", newFancy, newFancyDoc)
instRepl.SetCommand("many-fancies", manyFancies)
repl.AddTypePrinter(instRepl, displayFancy)
repl.AddTypePrinter(instRepl, displayFancies)
for {
line, err := rl.Readline()