goh

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2019 License: MIT Imports: 1 Imported by: 0

README

goh

GO helpers - is a tiny-tidy library aims to avoid some default manipulations which you are doing every day.

Examples

Coming soon.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Between

func Between(values []int, value, beforeValue, afterValue int) bool

Between checks if a value is between two values in a slice.

func FilterInt

func FilterInt(values *[]int, condition func(v int) bool) []int

FilterStrings gets a slice of integers and returns a new one with values which passed condition check.

func FilterStrings

func FilterStrings(values *[]string, condition func(v string) bool) []string

FilterStrings gets a slice of strings and returns a new slice with values which passed condition check.

func IncludeInt

func IncludeInt(values []int, value int) bool

IncludeInt checks if a value is present in a slice.

func IncludeString

func IncludeString(values []string, value string) bool

IncludeStrings checks if a value is present in a slice.

func IntSliceEqual

func IntSliceEqual(f, s []int) bool

IntSliceEqual checks if two slices of integers are equal

func MapInt

func MapInt(values *[]int, f func(v int) int) []int

MapString creates a new value based on function argument and returns a new slice.

func MapString

func MapString(values *[]string, f func(v string) string) []string

MapString creates a new value based on function argument and returns a new slice.

func Replace

func Replace(values *[]int, old, new int) []int

IncludeStrings replace a value with new value and returns a new slice without modifying original.

func StringSliceEqual

func StringSliceEqual(f, s []string) bool

StringSliceEqual checks if two slices of strings are equal

Types

This section is empty.

Jump to

Keyboard shortcuts

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