Documentation
¶
Index ¶
- Variables
- func Base64String(path string) (string, error)
- func CreateDir(dir string, perm os.FileMode) error
- func GetIPFromCIDR(cidr string, n int) (net.IP, error)
- func HTTPGet(url string, timeout time.Duration, insecure bool) (int, error)
- func PrettyPrint(out io.Writer, msg string, a ...interface{})
- func PrettyPrintErr(out io.Writer, msg string, a ...interface{})
- func PrettyPrintErrorIgnored(out io.Writer, msg string, a ...interface{})
- func PrettyPrintOk(out io.Writer, msg string, a ...interface{})
- func PrettyPrintSkipped(out io.Writer, msg string, a ...interface{})
- func PrettyPrintUnreachable(out io.Writer, msg string, a ...interface{})
- func PrettyPrintWarn(out io.Writer, msg string, a ...interface{})
- func PrintColor(out io.Writer, clr *color.Color, msg string, a ...interface{})
- func PrintError(out io.Writer)
- func PrintHeader(out io.Writer, msg string, padding byte)
- func PrintOk(out io.Writer)
- func PrintOkln(out io.Writer)
- func PrintSkipped(out io.Writer)
- func PrintValidationErrors(out io.Writer, errors []error)
- func PrintWarn(out io.Writer)
- func PromptForInt(in io.Reader, out io.Writer, prompt string, defaultValue int) (int, error)
- func Subset(first, second []string) bool
Constants ¶
This section is empty.
Variables ¶
var Blue = color.New(color.FgCyan)
var Green = color.New(color.FgGreen)
var Red = color.New(color.FgRed)
var White = color.New(color.FgHiWhite)
Functions ¶
func Base64String ¶
Base64String read file and return base64 string
func GetIPFromCIDR ¶
GetIPFromCIDR Naive implementation, but works
func HTTPGet ¶ added in v1.2.0
HTTPGet a proxy to http.Get with timeout and insecure cert timeout of 0 means no timeout
func PrettyPrint ¶
PrettyPrint no type will be displayed, used for just single line printing
func PrettyPrintErr ¶
PrettyPrintErr [ERROR](Red) with formatted string
func PrettyPrintErrorIgnored ¶
PrettyPrintErrorIgnored [ERROR IGNORED](Red) with formatted string
func PrettyPrintOk ¶
PrettyPrintOk [OK](Green) with formatted string
func PrettyPrintSkipped ¶
PrettyPrintSkipped [SKIPPED](blue) with formatted string
func PrettyPrintUnreachable ¶
PrettyPrintUnreachable [UNREACHABLE](Red) with formatted string
func PrettyPrintWarn ¶
PrettyPrintWarn [WARNING](Orange) with formatted string
func PrintColor ¶
PrintColor prints text in color
func PrintError ¶
PrintError print whole message in error(Red) format
func PrintHeader ¶
PrintHeader will print header with predifined width
func PrintSkipped ¶
PrintSkipped print whole message in green(Red) format
func PrintValidationErrors ¶ added in v1.2.0
PrintValidationErrors loops through the errors
func PromptForInt ¶
PromptForInt read command line input
Types ¶
This section is empty.