Commit Graph
4 Commits
Author SHA1 Message Date
Andrew Slotin 4eadc39e27 Log error and exit if the db file could not be opened within 1s 2017-10-13 18:57:28 +07:00
Andrew Slotin 6bfd6215e6 Exit with status code 2 if no files were given
By convention exit(1) is reserved for general errors, while exit(2)
means command misuse. Stdlib `flags` package invokes `os.Exit(2)`
after printing out the usage message. This commit changes the empty
files list exit code to be aligned with this behavior.
2017-10-12 11:52:33 +07:00
Andrew Slotin 46e67d5848 Add --help flag support
Currently executing `boltbrowser --help` creates a file with name
`--help` in the current working directory, which is counterintuitive.
This commit adds command-line flags support to boltbrowser and changes
it to print out the usage message instead.
2017-10-12 11:47:00 +07:00
Andrew Slotin 3c22c6227b Add *.db to .gitignore
To avoid committing BoltDB database files by accident.
2017-10-12 11:46:12 +07:00