tools

package
v0.0.0-...-3ac0d25 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Ask

func Ask(msg string, isSecret bool) (string, error)

Ask provides interactive terminal for users to answer and return string

func AskContinue

func AskContinue(msg string) error

AskContinue provides interactive terminal for users to answer if they continue process or not

func ClearOsEnv

func ClearOsEnv() error

ClearOsEnv removes all environment variables about AWS

func CopyToClipBoard

func CopyToClipBoard(token string) error

CopyToClipBoard copies token to clipboard

func CreateFile

func CreateFile(filePath string, writeData string) error

CreateFile creates/overrides files

func FileExists

func FileExists(filename string) bool

Check if file exists

func FormatKeyForDisplay

func FormatKeyForDisplay(k string) string

FormatKeyForDisplay displays key with masking

func GetKeys

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

GetKeys returns key list from map structure

func IsExpired

func IsExpired(targetDate time.Time, timeAdded time.Duration) bool

IsExpired compares current time with (targetDate + timeAdded)

func IsStringInArray

func IsStringInArray(s string, arr []string) bool

Figure out if string is in array

func SetUpLogs

func SetUpLogs(stdErr io.Writer, level string) error

SetUpLogs set logrus log format

Types

This section is empty.

Jump to

Keyboard shortcuts

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