瀏覽代碼

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

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 1 年之前
父節點
當前提交
478f4aed63
共有 1 個文件被更改,包括 1 次插入3 次删除
  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
 	}