Skip to content

Commit

Permalink
REFACTOR Go doc now support markdown file!
Browse files Browse the repository at this point in the history
omg at last.
  • Loading branch information
oelmekki committed Jul 3, 2023
1 parent a978cb8 commit 6bd415e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 136 deletions.
17 changes: 17 additions & 0 deletions core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Package core allows to use pgrebase as a library in your own code.

To use it, your first need to initialize it:

err := core.Init(databaseUrl, sqlDir)

`databaseUrl` is the postgres connection string as used by
`database/sql.Open`, `sqlDir` is the path to your sql sources, and watch is
a flag you can set to true to keep watching sqlDir for changes.

Once pgrebase is initialized, call `Process()` to load your source files
into database.

If you want to keep watching FS for changes after than, you can call
`Watch()`. Note that this function won't return, so unless that's what you
want, you should run it in a goroutine.

16 changes: 0 additions & 16 deletions core/doc.go

This file was deleted.

120 changes: 0 additions & 120 deletions doc.go

This file was deleted.

0 comments on commit 6bd415e

Please sign in to comment.