len(matches) >= i+1
to len(matches) > i
74 // need to both contain `register.go` and `keep alive failed`
75 pattern := regexp.MustCompile(`register.go.*keep alive failed`)
76 matches := pattern.FindAll(content, -1)
77 return len(matches) >= i+178 })
79 etcd.Close()
80 etcd, err = embed.StartEtcd(&cfg)
Some boolean expressions can be simplified to be more concise and readable.
var x, y int
if x > y - 1 {}
x < y || x == y
var x, y int
if x >= y {}
x <= y