How to run .exe program using Golang? The program should start in the new main.exe window (The program has an I / O stream, reading data from the keyboard)
package main import ( "fmt" "os/exec" "time" ) func main() { output, err := exec.Command("main.exe").Output() if err != nil { fmt.Println(err.Error()) } fmt.Println(string(output)) time.Sleep(time.Second * 3) } I start, nothing appears, main.exe appears in the task main.exe , but it is inactive, because as I said above, it reads the data and then acts. If I rewrite main.exe without reading the data from the keyboard, then the program will start and everything will be fine displayed on the screen. How to make so that programs which read data from the keyboard were normally carried out / worked?