optimize code (#637)

master
heyanfu 4 years ago committed by GitHub
parent 7405d7f506
commit 0466af5e49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -58,13 +58,11 @@ func (sc RpcServerConf) HasEtcd() bool {
// Validate validates the config.
func (sc RpcServerConf) Validate() error {
if sc.Auth {
if err := sc.Redis.Validate(); err != nil {
return err
}
if !sc.Auth {
return nil
}
return nil
return sc.Redis.Validate()
}
// HasCredential checks if there is a credential in config.

Loading…
Cancel
Save