utils

package module
v0.4.0 Latest Latest
Warning

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

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

README

utils

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbsPath added in v0.3.0

func AbsPath(path string) string

func ArgMaxFloat64

func ArgMaxFloat64(data []float64) int

func ArgMinFloat64

func ArgMinFloat64(data []float64) int

func CopyFile

func CopyFile(src, dst string) (bool, error)

func EqualInt added in v0.2.0

func EqualInt(data, data2 []int) bool

func EqualString

func EqualString(data []string, data2 []string) bool

func Exist

func Exist(path string) bool

func FilterString

func FilterString(data []string, filter func(ele string) bool) []string

func IsDir

func IsDir(path string) bool

func IsFile

func IsFile(path string) bool

func KeysMapStringInt added in v0.3.0

func KeysMapStringInt(m map[string]int) []string

func MapAnyInt added in v0.2.0

func MapAnyInt(data []interface{}, mapper func(e interface{}) int) []int

func MapIntInt added in v0.2.0

func MapIntInt(data []int, mapper func(e int) int) []int

func MapIntString added in v0.2.0

func MapIntString(data []int, mapper func(e int) string) []string

func ReduceIntInt added in v0.2.0

func ReduceIntInt(data []int, reduce func(cur, nxt int) int, init int) int

func ReverseString

func ReverseString(data []string) []string

Types

type StringIntPair added in v0.3.0

type StringIntPair struct {
	First  string
	Second int
}

func SortMapStringIntByValue added in v0.3.0

func SortMapStringIntByValue(m map[string]int) []StringIntPair

Jump to

Keyboard shortcuts

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