utils

package
v0.0.0-...-f628d08 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Cyan          = 36
	Green         = 32
	Magenta       = 35
	Red           = 31
	Yellow        = 33
	BackgroundRed = 41
)

Variables

View Source
var ColorResetEscape = "\033[0m"

Reset sequence

Functions

func CheckErr

func CheckErr(msg interface{})

func ColorEscape

func ColorEscape(color int) string

ColorResetEscape translates a ANSI color number to a color escape.

func Colorize

func Colorize(msg string, color int) string

Colorize the msg using ANSI color escapes

func CreateIfMatchingPrompt

func CreateIfMatchingPrompt(password []rune, firstPassword string) string

func CreateStrengthPrompt

func CreateStrengthPrompt(password []rune) string

func GetFirstPassword

func GetFirstPassword() (string, error)

func GetLoginToken

func GetLoginToken() (*string, *string)

GetLoginToken fetches the token

func GetRetypePassword

func GetRetypePassword(firstPassword string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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