Set profile using CLI argument
This commit is contained in:
parent
de8145e8b6
commit
a18c9b2101
|
@ -1,13 +1,20 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"sevenkeys/cli"
|
||||
"sevenkeys/database"
|
||||
"sevenkeys/figlet"
|
||||
)
|
||||
|
||||
func main() {
|
||||
db := database.GetDatabaseFromConfig("config.json")
|
||||
var profile string
|
||||
if len(os.Args) < 2 {
|
||||
profile = "production"
|
||||
} else {
|
||||
profile = os.Args[1]
|
||||
}
|
||||
db := database.GetDatabaseFromConfig("config." + profile + ".json")
|
||||
|
||||
figlet.ReadFigletFonts()
|
||||
cli.ShowSplashScreen()
|
||||
|
|
Loading…
Reference in New Issue