jweinst1
1/15/2016 - 10:18 PM

get user input in the go language

get user input in the go language

package main
//takes string and returns there length
import "fmt"

func main() {
    fmt.Print("Enter text: ")
    var input string
    fmt.Scanln(&input)
    fmt.Print(len(input))
}