utils

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: MIT Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// SuccessFlag success flag
	SuccessFlag = color.GreenString("✔ ")
	// ErrorFlag error flag
	ErrorFlag = color.RedString("✗ ")
)

Functions

func ArgumentsCheck

func ArgumentsCheck(argCount, min, max int) error

ArgumentsCheck check arguments count correctness

func GetHomeDir

func GetHomeDir() string

GetHomeDir return user's home directory

func GetUsername

func GetUsername() string

GetUsername return current username

func ParseConnect added in v0.5.1

func ParseConnect(connect string) (string, string, string)

ParseConnect parse connect string, format is [user@]host[:port]

func Query

func Query(values, keys []string, ignoreCase bool) bool

Query values contains keys

func SortKeys

func SortKeys(m map[string]string) []string

SortKeys sort map keys

Types

This section is empty.

Jump to

Keyboard shortcuts

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