Go program run external soft.exe with arguments:
cmd := exec.Command("soft.exe", "-text")
out, _ := cmd.CombinedOutput()
fmt.Printf("%s", out)
soft.exe file has some output and wait for input value, for example:
Please choose code: 1, 2, 3, 4
In usual way in shell window I just type "1" and press Enter, and soft.exe give me result.
Thank you, your code is [some number]
How can I fill "1" after run and get output with GoLang? In my example after run soft.exe it immediately finish working with "Please choose code: 1, 2, 3, 4".