mirror of
https://github.com/h44z/wg-portal.git
synced 2025-09-15 07:11:15 +00:00
chore: get rid of static code warnings
This commit is contained in:
@@ -63,6 +63,7 @@ type Config struct {
|
||||
Web WebConfig `yaml:"web"`
|
||||
}
|
||||
|
||||
// LogStartupValues logs the startup values of the configuration in debug level
|
||||
func (c *Config) LogStartupValues() {
|
||||
logrus.Infof("Log Level: %s", c.Advanced.LogLevel)
|
||||
|
||||
@@ -89,6 +90,7 @@ func (c *Config) LogStartupValues() {
|
||||
logrus.Debugf(" - Ldap Providers: %d", len(c.Auth.Ldap))
|
||||
}
|
||||
|
||||
// defaultConfig returns the default configuration
|
||||
func defaultConfig() *Config {
|
||||
cfg := &Config{}
|
||||
|
||||
@@ -155,6 +157,8 @@ func defaultConfig() *Config {
|
||||
return cfg
|
||||
}
|
||||
|
||||
// GetConfig returns the configuration from the config file.
|
||||
// Environment variable substitution is supported.
|
||||
func GetConfig() (*Config, error) {
|
||||
cfg := defaultConfig()
|
||||
|
||||
|
Reference in New Issue
Block a user