utils

package
v2.5.3 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contains

func Contains(array []string, val string) bool

func Expect

func Expect(t *testing.T, got, want interface{})

Expect compare two values for testing

func GenNodeName

func GenNodeName() string

func GenerateUUID4

func GenerateUUID4() string

GenerateUUID4 create a UUID

func GetIP

func GetIP() string

func GetOutBoundIP

func GetOutBoundIP() (ip string, err error)

func GetPrivateIP

func GetPrivateIP() (string, error)

func GetPublicIP

func GetPublicIP() (string, error)

func InArray

func InArray(val interface{}, array interface{}) bool

func InSliceString

func InSliceString(sl []string, st string) bool

InSliceString returns true if a string exists in a slice of strings. This temporary and should be replaced with a function from the new go slices package in 1.19 when available. https://github.com/golang/go/issues/45955

func JoinStrBase

func JoinStrBase(sep string, elems []string) string

func JoinStrings

func JoinStrings(elems ...string) string

func PathExists

func PathExists(path string) bool

PathExists returns true if the given path exists.

func TopicMatch

func TopicMatch(filter, topic string, handleSharedSubscription bool) bool

func Unset

func Unset(a []string, i int) []string

Unset remove element at position i

Types

This section is empty.

Jump to

Keyboard shortcuts

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