mirror of
https://codeberg.org/shroff/phylum.git
synced 2026-01-06 03:31:02 -06:00
[server][cmd] extract common initialization functions
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package command
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"path"
|
||||
|
||||
@@ -45,11 +44,6 @@ func SetupCommand() {
|
||||
os.Mkdir(workDir, 0750)
|
||||
os.Chdir(workDir)
|
||||
}
|
||||
|
||||
var err error
|
||||
if err = db.Create(context.Background(), viper.GetString("database_url"), debug && viper.GetBool("trace_sql")); err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
defer func() {
|
||||
|
||||
Reference in New Issue
Block a user