Version: v0.0.0-...-6cecd9c Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jan 19, 2020 License: Apache-2.0 Imports: 4 Imported by: 0




This section is empty.


This section is empty.


func AskForConfirmation

func AskForConfirmation(okayResponses []string, nokayResponses []string, message string) bool

AskForConfirmation uses Scanln to parse user input. A user must type in "yes" or "no" and then press enter. It has fuzzy matching, so "y", "Y", "yes", "YES", and "Yes" all count as confirmations. If the input is not recognized, it will ask again. The function does not return until it gets a valid response from the user. Typically, you should use fmt to print out a question before calling askForConfirmation. E.g. fmt.Println("WARNING: Are you sure? (yes/no)")

func ContainsString

func ContainsString(slice []string, element string) bool

ContainsString returns true iff slice contains element

func FilterStringMap

func FilterStringMap(data string, key string) []string

FilterStringMap will filter the map


This section is empty.

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL