utility

package
v0.0.0-...-a9c1c3f Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CreateDirectory = func(path string, dirName string, force bool) error {
	var newDirPath bytes.Buffer
	newDirPath.WriteString(path)
	newDirPath.WriteString("/")
	newDirPath.WriteString(dirName)

	var err error
	if _, err = os.Stat(newDirPath.String()); os.IsNotExist(err) {
		err = os.Mkdir(newDirPath.String(), 0777)
	}

	return err
}

CreateDirectory us used to create dir

Functions

func AssertContains

func AssertContains(t *testing.T,
	arr []interface{}, obj interface{}, errorMessage string)

AssertContains checks if the object is inside the given array

func AssertEqual

func AssertEqual(t *testing.T,
	actual interface{},
	expected interface{},
	errorMessage string)

AssertEqual is equality tester

func AssertSubString

func AssertSubString(t *testing.T,
	parent string, subString string, errorMessage string)

AssertSubString checks if a string is contained in another

Types

This section is empty.

Jump to

Keyboard shortcuts

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