Want "30 of month" but get "30"
package main
import "fmt"
func main() {
var s string
fmt.Scanln(&s)
fmt.Println(s)
return
}
$ go run test.go
31 of month
31
Scanln is similar to Scan, but stops scanning at a newline and after the final item there must be a newline or EOF.
fmt.Println(s)
outside of the loop, no values will be output. how can i stop the loop – Danielladanielle