fix: update default flag values

This commit is contained in:
Derrick Hammer 2023-04-30 02:14:14 -04:00
parent 58165e01af
commit 241db4deb6
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 4 additions and 2 deletions

View File

@ -1,6 +1,7 @@
package config
import (
"errors"
"fmt"
"github.com/spf13/pflag"
"github.com/spf13/viper"
@ -15,12 +16,13 @@ func Init() {
viper.AddConfigPath(".")
viper.SetEnvPrefix("LUME_WEB_PORTAL")
pflag.String("database.type", "mysql", "Database type")
pflag.String("database.type", "sqlite", "Database type")
pflag.String("database.host", "localhost", "Database host")
pflag.Int("database.port", 3306, "Database port")
pflag.String("database.user", "root", "Database user")
pflag.String("database.password", "", "Database password")
pflag.String("database.name", "mydb", "Database name")
pflag.String("database.name", "lumeweb_portal", "Database name")
pflag.String("database.path", "./db.sqlite", "Database path for SQLite")
pflag.Parse()
err := viper.BindPFlags(pflag.CommandLine)