utils

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TestCounter = 0

Functions

func DoesMatchPattern added in v1.5.0

func DoesMatchPattern(regex string, input string) bool

func ExitIfError added in v1.0.16

func ExitIfError(err error)

func GetConfirmationOrExit added in v1.4.0

func GetConfirmationOrExit(prompt string)

func GetHomeDir added in v1.4.2

func GetHomeDir() string

func GetPassword added in v1.0.2

func GetPassword() string

func MergeStringMaps added in v1.4.0

func MergeStringMaps(a map[string]interface{}, b map[string]interface{}) map[string]interface{}

func MultipleChoiceInputReader added in v1.0.15

func MultipleChoiceInputReader(prompt string, choices []string) string

MultipleChoiceInputReader This method takes in a prompt string, and a list of choices, and asks the user for input based on the list of choices, the user enters a number to corresponding to their selection. The value of the selection is returned.

func PrintTabFormattedText added in v1.0.16

func PrintTabFormattedText(col1 string, col2 string, minWidth, tabWidth int, padding int)

func SaveConfig added in v1.0.16

func SaveConfig(v *viper.Viper, location string)

func StringInputReader added in v1.0.15

func StringInputReader(prompt string) string

func ThrowError

func ThrowError(message string) error

func ViperReadConfig

func ViperReadConfig(configFilePath string, configFileName string, configFileType string) (*viper.Viper, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL