Code formatting and cleanup (#442)

* Formatting, extract error messages
* More refactor
* Move errors to a separate file
* Add missing file
* Misc
This commit is contained in:
Dan Sosedoff
2019-09-29 12:16:42 -05:00
committed by GitHub
parent c4db1973c4
commit 7a6450091a
6 changed files with 109 additions and 66 deletions

View File

@@ -22,8 +22,7 @@ type Dump struct {
// CanExport returns true if database dump tool could be used without an error
func (d *Dump) CanExport() bool {
err := exec.Command("pg_dump", "--version").Run()
return err == nil
return exec.Command("pg_dump", "--version").Run() == nil
}
// Export streams the database dump to the specified writer