WIP implement high-level pagination test

This commit is contained in:
lash
2023-04-10 16:12:22 +01:00
parent 0831a4ea53
commit 5f04698d0a
8 changed files with 60 additions and 14 deletions

View File

@@ -12,13 +12,15 @@ import (
func main() {
var dir string
var root string
var size uint
flag.StringVar(&dir, "d", ".", "resource dir to read from")
flag.UintVar(&size, "s", 0, "max size of output")
flag.StringVar(&root, "root", "root", "entry point symbol")
flag.Parse()
fmt.Fprintf(os.Stderr, "starting session at symbol '%s' using resource dir: %s\n", root, dir)
ctx := context.Background()
en := engine.NewDefaultEngine(dir)
en := engine.NewSizedEngine(dir, uint32(size))
err := engine.Loop(&en, root, ctx, os.Stdin, os.Stdout)
if err != nil {
fmt.Fprintf(os.Stderr, "loop exited with error: %v", err)