Documentation ¶
Index ¶
- func Contains(input []interface{}, value interface{}) (bool, error)
- func CopyFile(dst, src string, perm os.FileMode) error
- func ExecCommand(name string, args ...string) error
- func IfThenElse(condition bool, a interface{}, b interface{}) interface{}
- func IsDirEmpty(dir string) (bool, error)
- func MoveDir(srcDir, dstDir string) error
- func RemoveDuplicateElement(addrs []string) []string
- func SliceTrimSpace(input []string) []string
- func StringInSlice(input []string, str string) bool
- func StringSliceEqual(s1, s2 []string) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
Contains check if a interface in a interface slice.
func CopyFile ¶
CopyFile copys src file to dest file
func ExecCommand ¶
ExecCommand is a wrapper of exec Command
func IfThenElse ¶
func IfThenElse(condition bool, a interface{}, b interface{}) interface{}
IfThenElse evaluates a condition, if true returns the first parameter, Otherwise the second.
func IsDirEmpty ¶
IsDirEmpty is to check if a directory is empty
func MoveDir ¶
MoveDir moves all files in srcDir to dstDir
func RemoveDuplicateElement ¶
RemoveDuplicateElement delete duplicate item from slice
func SliceTrimSpace ¶
SliceTrimSpace delete empty item, like " ", "\t", "\n" from slice
func StringInSlice ¶
StringInSlice checks if a string in the slice.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.