Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
16 lines (12 sloc) 214 Bytes
package genny
import (
"bufio"
"fmt"
"os"
)
func Confirm(msg string) bool {
reader := bufio.NewReader(os.Stdin)
fmt.Print(msg)
text, _ := reader.ReadString('\n')
return (text == "y\n" || text == "Y\n")
}
You can’t perform that action at this time.