mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-16 23:29:21 +00:00
Improvement suggested by PR comment
Fail early makes the code more readable
This commit is contained in:
parent
207a5a1267
commit
2a6ed9a698
@ -609,7 +609,10 @@ func makeRegionEndpointSignature(serviceName, region string) string {
|
||||
}
|
||||
|
||||
func parseOverrides(cfg *CloudConfig) error {
|
||||
if len(cfg.Global.ServiceOverrides) > 0 {
|
||||
overridesActive = false
|
||||
if len(cfg.Global.ServiceOverrides) == 0 {
|
||||
return nil
|
||||
}
|
||||
if err := setOverridesDefaults(cfg); err != nil {
|
||||
return err
|
||||
}
|
||||
@ -632,9 +635,6 @@ func parseOverrides(cfg *CloudConfig) error {
|
||||
overrides[signature] = CustomEndpoint{Endpoint: url, SigningRegion: signingRegion}
|
||||
}
|
||||
overridesActive = true
|
||||
} else {
|
||||
overridesActive = false
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user