test

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const ValidUUIDRegex = `(?i)^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$`

ValidUUIDRegex is a constant representing a regular expression rule to validate UUID string

Variables

This section is empty.

Functions

func CaptureCommandOutput

func CaptureCommandOutput(cmd *cobra.Command, args []string) (string, error)

CaptureCommandOutput set cobra command args, if necessary, then capture the output

func CaptureOutput

func CaptureOutput(funcToExec execute) (string, error)

CaptureOutput changes default stdout to intercept into a buffer, converts it to string and returns it

func ChangeCurrentDir

func ChangeCurrentDir(desiredDir string) error

ChangeCurrentDir gets current working directory and changes to its parent until finds the desired directory or fail

func GetCurrentDirName

func GetCurrentDirName(path string) string

GetCurrentDirName returns current working directory

func StringifyStruct added in v1.1.3

func StringifyStruct(v interface{}) (string, error)

StringifyStruct stringify struct for pretty print

Types

This section is empty.

Jump to

Keyboard shortcuts

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