Files
gitea-repo-config/Gitea.Declarative.Lib/UserInput.fs
2022-12-30 12:54:35 +00:00

16 lines
389 B
Forth

namespace Gitea.Declarative
[<RequireQualifiedAccess>]
module internal UserInput =
let rec getDefaultNo (getUserInput : string -> string) (message : string) : bool =
let answer = getUserInput $"{message} (y/N): "
match answer with
| "y"
| "Y" -> true
| "n"
| "N"
| "" -> false
| _ -> getDefaultNo getUserInput message