diff --git a/scripts/test_lib.sh b/scripts/test_lib.sh index f2bb91ca6..a22a87446 100644 --- a/scripts/test_lib.sh +++ b/scripts/test_lib.sh @@ -108,7 +108,7 @@ function relativePath { # go_srcs_in_module [package] # returns list of all not-generated go sources in the current (dir) module. function go_srcs_in_module { - go fmt -n "$1" | grep -Eo "([^ ]*)$" | grep -vE "(\\_test.go|\\.pb\\.go|\\.pb\\.gw.go)" + go list -f "{{with \$c:=.}}{{range \$f:=\$c.GoFiles }}{{\$c.Dir}}/{{\$f}}{{\"\n\"}}{{end}}{{end}}" ./... | grep -vE "(\\.pb\\.go|\\.pb\\.gw.go)" } # pkgs_in_module [optional:package_pattern]