mirror of
https://github.com/ergochat/ergo.git
synced 2024-12-22 10:42:52 +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) {
|
||||
return nil, ErrServerNameNotHostname
|
||||
}
|
||||
config.Server.nameCasefolded = strings.ToLower(config.Server.Name)
|
||||
if config.Datastore.Path == "" {
|
||||
return nil, ErrDatastorePathMissing
|
||||
}
|
||||
@ -804,12 +805,6 @@ func LoadConfig(filename string) (config *Config, err error) {
|
||||
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
|
||||
operclasses, err := config.OperatorClasses()
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user