Move flag handling into cmd/
This commit is contained in:
@@ -10,9 +10,12 @@ import (
|
||||
)
|
||||
|
||||
func main() {
|
||||
var databasePath, fileStorePath string
|
||||
|
||||
flag.StringVar(&databasePath, "database", "", "Location of the database file")
|
||||
flag.Parse()
|
||||
|
||||
if err := db.Open(); err != nil {
|
||||
if err := db.Open(databasePath); err != nil {
|
||||
log.Fatalln(err)
|
||||
}
|
||||
defer db.Close()
|
||||
|
||||
Reference in New Issue
Block a user