Pārlūkot izejas kodu

libnetwork/datastore: ScopeCfg.IsValid(): un-wrap conditions

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 1 gadu atpakaļ
vecāks
revīzija
478f4aed63
1 mainītis faili ar 1 papildinājumiem un 3 dzēšanām
  1. 1 3
      libnetwork/datastore/datastore.go

+ 1 - 3
libnetwork/datastore/datastore.go

@@ -116,9 +116,7 @@ func DefaultScope(dataDir string) ScopeCfg {
 
 // IsValid checks if the scope config has valid configuration.
 func (cfg *ScopeCfg) IsValid() bool {
-	if cfg == nil ||
-		strings.TrimSpace(cfg.Client.Provider) == "" ||
-		strings.TrimSpace(cfg.Client.Address) == "" {
+	if cfg == nil || strings.TrimSpace(cfg.Client.Provider) == "" || strings.TrimSpace(cfg.Client.Address) == "" {
 		return false
 	}