mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 18:52:41 +01:00
remove redundant error check
This commit is contained in:
parent
82e965db39
commit
0df25e0e30
@ -618,6 +618,7 @@ func LoadConfig(filename string) (config *Config, err error) {
|
|||||||
if !utils.IsServerName(config.Server.Name) {
|
if !utils.IsServerName(config.Server.Name) {
|
||||||
return nil, ErrServerNameNotHostname
|
return nil, ErrServerNameNotHostname
|
||||||
}
|
}
|
||||||
|
config.Server.nameCasefolded = strings.ToLower(config.Server.Name)
|
||||||
if config.Datastore.Path == "" {
|
if config.Datastore.Path == "" {
|
||||||
return nil, ErrDatastorePathMissing
|
return nil, ErrDatastorePathMissing
|
||||||
}
|
}
|
||||||
@ -804,12 +805,6 @@ func LoadConfig(filename string) (config *Config, err error) {
|
|||||||
config.Debug.recoverFromErrors = true
|
config.Debug.recoverFromErrors = true
|
||||||
}
|
}
|
||||||
|
|
||||||
// casefold/validate server name
|
|
||||||
config.Server.nameCasefolded = strings.ToLower(config.Server.Name)
|
|
||||||
if err != nil {
|
|
||||||
return nil, fmt.Errorf("Server name isn't valid [%s]: %s", config.Server.Name, err.Error())
|
|
||||||
}
|
|
||||||
|
|
||||||
// process operator definitions, store them to config.operators
|
// process operator definitions, store them to config.operators
|
||||||
operclasses, err := config.OperatorClasses()
|
operclasses, err := config.OperatorClasses()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user