From 8825ff8ff2a5890d34a6830231f0f59287c8fa05 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 15 Nov 2019 11:48:02 +0100 Subject: pkg/runtest: shrink if condition --- pkg/runtest/run.go | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'pkg') diff --git a/pkg/runtest/run.go b/pkg/runtest/run.go index 2c3970990..2b0fb982e 100644 --- a/pkg/runtest/run.go +++ b/pkg/runtest/run.go @@ -167,13 +167,9 @@ func (ctx *Context) generatePrograms(progs chan *RunRequest) error { sort.Strings(sandboxes) sysTarget := targets.Get(ctx.Target.OS, ctx.Target.Arch) for _, file := range files { - if strings.HasSuffix(file.Name(), "~") { - continue - } - if strings.HasSuffix(file.Name(), ".swp") { - continue - } - if !strings.HasPrefix(file.Name(), ctx.Tests) { + if strings.HasSuffix(file.Name(), "~") || + strings.HasSuffix(file.Name(), ".swp") || + !strings.HasPrefix(file.Name(), ctx.Tests) { continue } p, requires, results, err := ctx.parseProg(file.Name()) -- cgit mrf-deployment