Skip to content

Commit

Permalink
Merge pull request #1 from jamf/master
Browse files Browse the repository at this point in the history
merge upstream
  • Loading branch information
BrandonRoehl authored Jan 21, 2020
2 parents c41f2ea + 38ef509 commit 020d6e4
Show file tree
Hide file tree
Showing 10 changed files with 561 additions and 388 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: go

go:
- 1.11.x
- 1.13.x
- master

script:
Expand Down
15 changes: 0 additions & 15 deletions Gopkg.lock

This file was deleted.

26 changes: 0 additions & 26 deletions Gopkg.toml

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ func main() {
config.Addr = "your-hostname:your-port"

dumpDir := "dumps" // you should create this directory
dumpFilenameFormat := fmt.Sprintf("%s-20060102T150405", dbname) // accepts time layout string and add .sql at the end of file
dumpFilenameFormat := fmt.Sprintf("%s-20060102T150405", config.DBName) // accepts time layout string and add .sql at the end of file

db, err := sql.Open("mysql", config.FormatDNS())
db, err := sql.Open("mysql", config.FormatDSN())
if err != nil {
fmt.Println("Error opening database: ", err)
return
Expand All @@ -39,12 +39,12 @@ func main() {
}

// Dump database to file
resultFilename, err := dumper.Dump()
err := dumper.Dump()
if err != nil {
fmt.Println("Error dumping:", err)
return
}
fmt.Printf("File is saved to %s", resultFilename)
fmt.Printf("File is saved to %s", dumpFilenameFormat)

// Close dumper, connected database and file stream.
dumper.Close()
Expand Down
Loading

0 comments on commit 020d6e4

Please sign in to comment.