We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8d9eb4 commit 9e8e95dCopy full SHA for 9e8e95d
main.go
@@ -1,3 +1,28 @@
1
package main
2
3
-func main() {}
+import (
4
+ "io/fs"
5
+ "os"
6
+ "os/exec"
7
+ "path"
8
+)
9
+
10
+func main() {
11
12
+ var matches, err = (fs.Glob(os.DirFS("./"), "./*/go.mod"))
13
+ if err != nil {
14
+ return
15
+ }
16
17
+ for _, m := range matches {
18
+ cmd := exec.Command("go", "test", "-v")
19
+ // fmt.Println(path.Dir(m), (cmd.Dir))
20
+ cmd.Dir = "./" + path.Dir(m)
21
+ cmd.Stdout = os.Stdout
22
+ cmd.Stderr = os.Stderr
23
+ var err = cmd.Run()
24
25
+ panic(err)
26
27
28
+}
0 commit comments