diff options
author | kaa <kaa@disroot.org> | 2025-07-13 05:45:34 -0700 |
---|---|---|
committer | kaa <kaa@disroot.org> | 2025-07-13 05:45:34 -0700 |
commit | 1da8c55994256c3823a0a4cfd8d480c0efef7d7c (patch) | |
tree | 723a5332ed3a3124395e5dc754a9d9b613db7d03 /cmd | |
parent | f4d85fb2e02387f2a774855a35250fdeffcb6fd6 (diff) |
Main to match internal API.
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/pgset/main.go | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/cmd/pgset/main.go b/cmd/pgset/main.go index 8d32fbe..1e66c69 100644 --- a/cmd/pgset/main.go +++ b/cmd/pgset/main.go @@ -1,11 +1,12 @@ package main import ( - "os" "io" + "os" "log" "strings" "pgset/lib/parse" + "fmt" ) func main() { @@ -15,15 +16,13 @@ func main() { log.Fatal(err) } - // Read from the string in memory a character at a time. - // The state holding the place in the input is passed around - // with the Reader. + // Parse the string in memory. r := strings.NewReader(string(in)) - - _, err = parse.Parse(r) + document, err := parse.Parse(r) if err != nil { log.Fatal(err) } + fmt.Println(document[0]) //neatroff(tree) //tex(tree) //sile(tree) |