-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
REFACTOR Go doc now support markdown file!
omg at last.
- Loading branch information
Showing
3 changed files
with
17 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
This file was deleted.
Oops, something went wrong.