浏览代码

should be break not continue

Ryan Huber 5 年之前
父节点
当前提交
5d0d916fc9
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lighthouse.go

+ 1 - 1
lighthouse.go

@@ -57,7 +57,7 @@ func (lh *LightHouse) ValidateLHStaticEntries() error {
 	for lhIP, _ := range lh.lighthouses {
 	for lhIP, _ := range lh.lighthouses {
 		for ip, _ := range lh.staticList {
 		for ip, _ := range lh.staticList {
 			if lhIP == ip {
 			if lhIP == ip {
-				continue
+				break
 			}
 			}
 			return fmt.Errorf("Lighthouse %s does not have a static_host_map entry", IntIp(lhIP))
 			return fmt.Errorf("Lighthouse %s does not have a static_host_map entry", IntIp(lhIP))
 		}
 		}