Set profile using CLI argument
This commit is contained in:
parent
de8145e8b6
commit
a18c9b2101
|
@ -1,13 +1,20 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"os"
|
||||||
"sevenkeys/cli"
|
"sevenkeys/cli"
|
||||||
"sevenkeys/database"
|
"sevenkeys/database"
|
||||||
"sevenkeys/figlet"
|
"sevenkeys/figlet"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
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()
|
figlet.ReadFigletFonts()
|
||||||
cli.ShowSplashScreen()
|
cli.ShowSplashScreen()
|
||||||
|
|
Loading…
Reference in New Issue