add check for unset XBIT_DB
This commit is contained in:
parent
68dd2ac323
commit
48a21aa523
4
main.go
4
main.go
|
@ -112,6 +112,10 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
dbpath := os.Getenv("XBIT_DB")
|
dbpath := os.Getenv("XBIT_DB")
|
||||||
|
if dbpath == "" {
|
||||||
|
log.Fatal("XBIT_DB not set")
|
||||||
|
}
|
||||||
|
|
||||||
var db TimelineDB
|
var db TimelineDB
|
||||||
var err error
|
var err error
|
||||||
db.DB, err = sql.Open("sqlite3", dbpath)
|
db.DB, err = sql.Open("sqlite3", dbpath)
|
||||||
|
|
Loading…
Reference in New Issue