Documentation ¶
Index ¶
- Constants
- Variables
- func GetCLIInputStr(prompt string) string
- func GetCLIIntRange(lo, hi int) int
- func GetCLIOption(prompt string, options []InputOption) int
- func GetCLIOptionMap(prompt string, options map[string]string, quitKey, quit string) string
- func GetCLIYesNo(prompt string) int
- func IfThenElse[T any](cond bool, ifVal, elseVal T) T
- func IfThenElseFn[T any](cond bool, ifFn, elseFn func() T) T
- func NormalizeNumStr(s string) string
- type InputOption
Constants ¶
View Source
const ( OptYes = 0 OptNo = 1 )
Variables ¶
View Source
var YesNoOpts = []InputOption{"Yes", "No"}
Functions ¶
func GetCLIInputStr ¶
func GetCLIIntRange ¶
getIntRange prompts the user to input an integer between LO and HI.
func GetCLIOption ¶
func GetCLIOption(prompt string, options []InputOption) int
func GetCLIOptionMap ¶
func GetCLIYesNo ¶
func IfThenElse ¶
func IfThenElseFn ¶
func NormalizeNumStr ¶
Types ¶
type InputOption ¶
type InputOption = string
Click to show internal directories.
Click to hide internal directories.