util

package
v1.1.10-0...-9a24f55 Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ask

func Ask(prompt string) (text string)

Ask can be used to get some input from the user. The user input will not be hidden (not secure).

func AskPassword

func AskPassword(length int, prompt string) []byte

AskPassword asks password from the user and hides the input.

func Check

func Check(err error)

Check is for error handlig. If an error occurred it will simply Exit from the application with status code 1.

func CheckPasswordConfirm

func CheckPasswordConfirm(password, confirm []byte) bool

CheckPasswordConfirm checks two byte array if the content is the same.

func Confirm

func Confirm(prompt string) bool

Confirm ask something from the user Acceptable true answers: yes, y, sure Everything else will be false.

func Debugln

func Debugln(message string)

Debugln is only for debugging. If DEBUG more is enabled (currently runtime) the given message will be printed to the Stderr with a NewLine character at the end of the line.

Types

This section is empty.

Jump to

Keyboard shortcuts

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