utils

package
v0.0.0-...-cbfbdd4 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(input []interface{}, value interface{}) (bool, error)

Contains check if a interface in a interface slice.

func ExecCommand

func ExecCommand(name string, args ...string) error

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

func IsDirEmpty(dir string) (bool, error)

IsDirEmpty is to check if a directory is empty

func MoveDir

func MoveDir(srcDir, dstDir string) error

MoveDir moves all files in srcDir to dstDir

func StringInSlice

func StringInSlice(input []string, str string) bool

StringInSlice checks if a string in the slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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