Explorar o código

Merge pull request #42044 from nathanlcarlson/labels_regex_length_check

Check the length of the correct variable #42039
Sebastiaan van Stijn %!s(int64=4) %!d(string=hai) anos
pai
achega
8b6d9eaa55
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      daemon/logger/loginfo.go

+ 1 - 1
daemon/logger/loginfo.go

@@ -42,7 +42,7 @@ func (info *Info) ExtraAttributes(keyMod func(string) string) (map[string]string
 	}
 
 	labelsRegex, ok := info.Config["labels-regex"]
-	if ok && len(labels) > 0 {
+	if ok && len(labelsRegex) > 0 {
 		re, err := regexp.Compile(labelsRegex)
 		if err != nil {
 			return nil, err