From 113b4ae6258c03d83346a7c8ab2ecf7f6ee35d1f Mon Sep 17 00:00:00 2001
From: "vito.he" <hxmhlt@163.com>
Date: Mon, 1 Jul 2019 13:54:08 +0800
Subject: [PATCH] Add: add a comment in registry_config

---
 config/registry_config.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/config/registry_config.go b/config/registry_config.go
index 816d93cf9..0c6b326a8 100644
--- a/config/registry_config.go
+++ b/config/registry_config.go
@@ -53,7 +53,8 @@ func loadRegistries(targetRegistries string, registries map[string]*RegistryConf
 		target := false
 
 		// if user not config targetRegistries,default load all
-		// Notice:If s does not contain sep and sep is not empty, SplitAfter returns a slice of length 1 whose only element is s.
+		// Notice:in func "func Split(s, sep string) []string"  comment : if s does not contain sep and sep is not empty, SplitAfter returns a slice of length 1 whose only element is s.
+		// So we have to add the condition when targetRegistries string is not set (it will be "" when not set)
 		if len(trSlice) == 0 || (len(trSlice) == 1 && trSlice[0] == "") {
 			target = true
 		} else {
-- 
GitLab