Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit ab69f58

Browse files
committed
Use use go 1.10 syntax for runing go sources
Signed-off-by: David Pordomingo <[email protected]>
1 parent 4a04a5a commit ab69f58

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

_examples/common_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,13 @@ func addRemote(local, remote string) {
137137
}
138138

139139
func testExample(t *testing.T, name, dir string) {
140-
arguments := append([]string{"run", dir}, args[name]...)
140+
files, err := filepath.Glob(filepath.Join(dir, "*.go"))
141+
if err != nil {
142+
t.Errorf("error finding command sources: %s", err)
143+
}
144+
145+
arguments := append([]string{"run"}, files...)
146+
arguments = append(arguments, args[name]...)
141147
cmd := exec.Command("go", arguments...)
142148

143149
cmd.Stdout = os.Stdout

0 commit comments

Comments
 (0)