forked from External/ergo
Fix PASS handling
This commit is contained in:
parent
bded3202c2
commit
41473bb444
2 changed files with 8 additions and 1 deletions
|
|
@ -51,6 +51,7 @@ type Config struct {
|
|||
|
||||
Server struct {
|
||||
PassConfig
|
||||
Password string
|
||||
Name string
|
||||
Database string
|
||||
Listen []string
|
||||
|
|
@ -109,6 +110,11 @@ func LoadConfig(filename string) (config *Config, err error) {
|
|||
return nil, err
|
||||
}
|
||||
|
||||
// we need this so PasswordBytes returns the correct info
|
||||
if config.Server.Password != "" {
|
||||
config.Server.PassConfig.Password = config.Server.Password
|
||||
}
|
||||
|
||||
if config.Network.Name == "" {
|
||||
return nil, errors.New("Network name missing")
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue