去新手這里。我正在嘗試運行非常簡單的示例go1.11.4 windows/amd64下面是我的代碼;沙箱:https://play.golang.org/p/GoALi4HYx3Lpackage mainimport ( "bufio" "fmt" "os")func main() { fmt.Print("Enter a grade: ") reader := bufio.NewReader(os.Stdin) fmt.Print("Enter text: ") input := reader.ReadString('\n') fmt.Println(input)}我收到以下錯誤:prog.go:13:28:單值上下文中的多值 reader.ReadString()我在這里錯過了什么嗎?
- 1 回答
- 0 關注
- 130 瀏覽
添加回答
舉報
0/150
提交
取消