1

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

KKIRIRI
  • 11
  • 1
  • 2
    Possible duplicate of [Issue with Sublime Text 3's build system - can't get input from running program](https://stackoverflow.com/questions/19254765/issue-with-sublime-text-3s-build-system-cant-get-input-from-running-program) – OdatNurd Jun 13 '18 at 17:38
  • So sublime text originally does not support standard. Is gosublime not capable of handling standard input as well? I tried to install sublimeREPL and run under REPL just now. The issue remains there. I am not sure if I need my own build system as Mattdmo mentioned in his solution. If so, I don't know what should be in my configuration since he answered the question is python within windows system. – KKIRIRI Jun 14 '18 at 18:54

0 Answers0