bufio.Scanner.Text code example Example: golang read line package main import "fmt" func main(){ x := string fmt.Scanln(&x) }