util

package
v1.0.0-alpha.10 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2019 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirExists

func DirExists(path string) (bool, error)

func ExpandPath

func ExpandPath(path string) string

func FileExists

func FileExists(path string) bool

func GenerateConsistentRandomString

func GenerateConsistentRandomString(n int) string

func InterfaceArrayToStringArray

func InterfaceArrayToStringArray(array []interface{}) ([]string, error)

func InterfaceToMapStringInterface

func InterfaceToMapStringInterface(value interface{}) (map[string]interface{}, error)

func InterfaceToStringArray

func InterfaceToStringArray(value interface{}) ([]string, error)

func IsStringsContainValue

func IsStringsContainValue(arr []string, value string) bool

func MurmurHash

func MurmurHash(args ...string) string

func RejectEmptyStrings

func RejectEmptyStrings(arr []string) []string

func Sha256Hash

func Sha256Hash(args ...string) string

func UniqAppendString

func UniqAppendString(arr []string, value string) []string

func UniqStrings

func UniqStrings(arr []string) []string

Types

type Stack

type Stack struct {
	// contains filtered or unexported fields
}

func NewStack

func NewStack() *Stack

Create a new stack

func (*Stack) Len

func (this *Stack) Len() int

Return the number of items in the stack

func (*Stack) Peek

func (this *Stack) Peek() interface{}

View the top item on the stack

func (*Stack) Pop

func (this *Stack) Pop() interface{}

Pop the top item of the stack and return it

func (*Stack) Push

func (this *Stack) Push(value interface{})

Push a value onto the top of the stack

Jump to

Keyboard shortcuts

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