golang-exercises/golangr/between-1-10-checker/startup.go

16 lines
424 B
Go
Raw Permalink Normal View History

package main
import (
"fmt"
"strings"
)
func startup(number float64) {
// Oh man I gotta use another library, strings lets me trim pretty easily any string and since bufio
// seems to append newlines to everything I'm gonna have to make use of this
fmt.Printf("Alright %s, give me a number, I will tell you if it's between 1 and 10\n", strings.TrimRight(name, "\n"))
fmt.Printf("Number: ")
fmt.Scan(&num)
return
}