From 020fc720379255832aad369dfc2dece9a1cf4699 Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sun, 3 Sep 2023 18:34:56 +0530 Subject: added pretty startup messages --- conf/conf.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'conf') diff --git a/conf/conf.go b/conf/conf.go index 9c3d328..26a5d90 100644 --- a/conf/conf.go +++ b/conf/conf.go @@ -25,7 +25,6 @@ import ( // TODO: validate config func init() { viper.SetConfigName("openbills") - viper.SetConfigType("toml") viper.AddConfigPath("/etc/openbills") viper.AddConfigPath(".") @@ -38,6 +37,7 @@ func init() { } viper.SetDefault("port", "8765") + viper.SetDefault("production_mode", false) viper.SetDefault("security.min_password_length", 12) viper.SetDefault("security.max_password_length", 72) @@ -52,4 +52,6 @@ func init() { viper.SetDefault("username.max_username_length", 20) viper.SetDefault("cryptography.password_hashing_cost", 14) + + log.Printf("\x1b[46m\x1b[30m[info]\x1b[0m Loaded Config File \"%s\"\n", viper.ConfigFileUsed()) } -- cgit v1.2.3