concourse / concourse

Simplify regular expression by using raw string literal SCC-S1007
Anti-pattern
Major
5 months ago4 years old
should use raw string (...) with regexp.MustCompile to avoid having to escape twice
426					scanner := bufio.NewScanner(bytes.NewBuffer(sess.Out.Contents()))
427					var match []string
428					for scanner.Scan() {
429						re := regexp.MustCompile("fly_port=(\\d+)")430						match = re.FindStringSubmatch(scanner.Text())
431						if len(match) > 0 {
432							break