modulepackage
0.1.42
Repository: https://github.com/paulcarlton-ww/goutils.git
Documentation: pkg.go.dev
# Functions
BoolPtr returns a pointer to a bool.
CallMethod calls a method on an object and returns the results.
CastToMapStringString casts an interface to a map[string]string.
CastToStringList casts an interface to a []string.
CheckError implements the CheckTestI interface, verifying that a error contains expected text strings.
CheckFieldGetter will the getter function of a field and check the value is equal to the expected value and set the test to failed if not.
CheckFieldsGetter will call the getter functions on an object to check the expected values are equal to the actual value and set the test to failed if not.
CheckFieldsValue will get the value of object fields and check the expected values are equal to the actual value and set the test to failed if not.
CheckFieldValue will check if a field value is equal to the expected value and set the test to failed if not.
CheckNotNil is passed two interfaces and checks if both or neither are nil.
CheckObjStatusFunc checks object fields values against expected and report if different.
CompareAsJSON compares two interfaces as JSON.
CompareJSON compares values by converting to json.
CompareReflectDeepEqual compares values using reflect.DeepEqual().
ContainsStringArray checks items in two string arrays verifying that the second string array is contained in the first.
ContainsStrings checks that all elements in a list of strings are contained in another string.
CopyObjectStatus copys an ObjectStatus object leaving Fields element empty.
DefaultCheckFunc is the default check test function that compares actual and expected.
DefaultPrepFunc is the default pre test function that prints the test number and name.
DisplayStrings returns a []string as a single string, one element per line.
GetPointerValue returns what a pointer points to.
HandlePanic handles a panic in test code calling testing.T.Fatal() with interface returned by recover().
IsPointer returns true if a variable is a pointer.
MapKeysToList returns the keys of a map[string]string as a list.
NewTestUtil retruns a new TestUtil interface.
ReadBuf reads lines from a buffer into a string array.
ReportCallJSON uses json to report on result of a function or method call.
ReportCallSpew uses spew to report on result of a function or method call.
ReportJSON uses json to report the differences between two values.
ReportSpew uses spew to report the differences between two values.
SetEnv sets an environmental variable.
SetEnvs sets a number of environmental variables.
SetObjStatusFields sets the values in the FieldInfo struct, used to update a template ObjectStatus with values for a given test.
ToJSON is used get an interface in JSON format.
UnsetEnv unsets an environmental variable.
UnsetEnvs unsets a list of environmental variables.
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
# Interfaces
No description provided by the author
# Type aliases
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author