GetDB - returns open BoltDB database with read/write permissions or goes down in flames if something bad happends
(name string)
| 184 | // GetDB - returns open BoltDB database with read/write permissions or goes down in flames if |
| 185 | // something bad happends |
| 186 | func GetDB(name string) *bolt.DB { |
| 187 | log.WithFields(log.Fields{ |
| 188 | "databaseName": name, |
| 189 | }).Info("Initiating database") |
| 190 | db, err := bolt.Open(name, 0600, nil) |
| 191 | if err != nil { |
| 192 | log.Fatal(err) |
| 193 | } |
| 194 | |
| 195 | return db |
| 196 | } |
no outgoing calls