mirror of
https://github.com/mitchell/selfpass.git
synced 2025-12-14 21:27:22 +00:00
Add 2 migrations for ids and boltdb; minor refactor to creds service
This commit is contained in:
parent
cf90993d4e
commit
a67be14fcb
13 changed files with 203 additions and 58 deletions
19
services/migrations/migration/migration.go
Normal file
19
services/migrations/migration/migration.go
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
package migration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
func Check(err error) {
|
||||
if err != nil {
|
||||
_, _, line, ok := runtime.Caller(1)
|
||||
if ok {
|
||||
fmt.Printf("%v: %s\n", line, err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
fmt.Println(err)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue