I just downloaded lastest sublime yesterday, a new user to sublime. I am using gosublime:go to implement some basic command. Problem came out when I tried to run the following code:
package main
import (
"fmt" )
func main() {
fmt.Print("Enter text: ")
var input string
fmt.Scanln(&input)
fmt.Print(input)
}
Program is supposed to wait for standard input to continue. But actually my IDE just finished without any waiting process.
Here is the output:
[ go run hallo.go
| done: 235.139884ms ]
Enter text:
I tried to find a solution online but it seems nobody else have the exact same issue before. Since I tried different commands and packages but none of them can let the program waiting for my input. So I consider this is the problem due to IDE rather than command.
Please tell me if you have any solution.
Go version
go version go1.10.3 darwin/amd64