util

package
v1.0.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(tb testing.TB, condition bool, msg string, v ...interface{})

Assert fails the test if the condition is false.

func Contains

func Contains(slice []string, value string) bool

Contains returns whether slice contains value

func Equals

func Equals(tb testing.TB, exp, act interface{})

Equals fails the test if exp is not equal to act.

func EqualsMultipleExp

func EqualsMultipleExp(tb testing.TB, exp interface{}, act interface{})

EqualsMultipleExp fails the test if exp is not equal to one of act.

func GenerateRandomString

func GenerateRandomString(n int) string

GenerateRandomString to have a unique code

func GetClusterServerOfCurrentContext

func GetClusterServerOfCurrentContext() (string, string, []byte, error)

GetClusterServerOfCurrentContext provides cluster and server info of the current context

func GetNamecheapCredentials

func GetNamecheapCredentials() (string, string, string, error)

GetNamecheapCredentials provides authentication info to have API Access

func GetServerOfCurrentContext

func GetServerOfCurrentContext() (string, error)

GetServerOfCurrentContext provides the server info of the current context

func NotEquals

func NotEquals(tb testing.TB, exp, act interface{})

NotEquals fails the test if exp is equal to act.

func OK

func OK(tb testing.TB, err error)

OK fails the test if an err is not nil.

func SliceContains

func SliceContains(slice [][]string, value []string) bool

SliceContains returns whether slice contains value

Types

This section is empty.

Jump to

Keyboard shortcuts

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