Signed-off-by: jolheiser <john.olheiser@gmail.com>
main
jolheiser 2021-11-03 21:53:52 -05:00
parent 7a37a54485
commit b7d07b1d84
Signed by: jolheiser
GPG Key ID: B853ADA5DA7BBF7A
1 changed files with 5 additions and 6 deletions

11
main.go
View File

@ -37,10 +37,9 @@ func main() {
*base = strings.TrimSuffix(*base, "/") *base = strings.TrimSuffix(*base, "/")
out, err := exec.Command("go", "mod", "init", fmt.Sprintf("%s/%s", *base, name)).CombinedOutput() cmd := exec.Command("go", "mod", "init", fmt.Sprintf("%s/%s", *base, name))
if err != nil { cmd.Stdin = os.Stdin
fmt.Println(err) cmd.Stdout = os.Stdout
return cmd.Stderr = os.Stderr
} _ = cmd.Run()
fmt.Print(string(out))
} }