Skip to content

Commit

Permalink
Merge pull request #16 from gilbert/patch-1
Browse files Browse the repository at this point in the history
Fix example in README.md
  • Loading branch information
guregu authored Jan 19, 2025
2 parents 10781f9 + 26b1434 commit 8cbf4da
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ import "github.com/trealla-prolog/go/trealla"

func main() {
// load the interpreter and (optionally) grant access to the current directory
pl := trealla.New(trealla.WithPreopen("."))
pl, err := trealla.New(trealla.WithPreopenDir("."))
if err != nil {
panic(err)
}
// run a query; cancel context to abort it
ctx := context.Background()
query := pl.Query(ctx, "member(X, [1, foo(bar), c]).")
Expand Down

0 comments on commit 8cbf4da

Please sign in to comment.