parent
7a37a54485
commit
b7d07b1d84
11
main.go
11
main.go
|
@ -37,10 +37,9 @@ func main() {
|
|||
|
||||
*base = strings.TrimSuffix(*base, "/")
|
||||
|
||||
out, err := exec.Command("go", "mod", "init", fmt.Sprintf("%s/%s", *base, name)).CombinedOutput()
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
return
|
||||
}
|
||||
fmt.Print(string(out))
|
||||
cmd := exec.Command("go", "mod", "init", fmt.Sprintf("%s/%s", *base, name))
|
||||
cmd.Stdin = os.Stdin
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
_ = cmd.Run()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue