mirror of
https://github.com/rancher/os.git
synced 2025-09-03 15:54:24 +00:00
Revert "WIP New ros cli"
This commit is contained in:
21
cmd/control/util.go
Normal file
21
cmd/control/util.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package control
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
"github.com/rancher/os/log"
|
||||
)
|
||||
|
||||
func yes(question string) bool {
|
||||
fmt.Printf("%s [y/N]: ", question)
|
||||
in := bufio.NewReader(os.Stdin)
|
||||
line, err := in.ReadString('\n')
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
|
||||
return strings.ToLower(line[0:1]) == "y"
|
||||
}
|
Reference in New Issue
Block a user