util

package
v0.0.0-...-cd47023 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2018 License: BSD-3-Clause Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cast

func Cast(num float64) int

Cast rounds num to integer.

func Contains

func Contains(slice []int32, item int32) bool

Contains reports whether an item is within the slice.

func FillStruct

func FillStruct(m map[string]interface{}, s interface{}) error

FillStruct converts map to struct.

func Hash

func Hash(s string) uint32

Hash generates hash number of a string.

func Round

func Round(num float64, precision int) float64

Round implements the round function.

func StringInSlice

func StringInSlice(str string, list []string) bool

StringInSlice checks if item is in slice/array.

func Sum

func Sum(nums []float64) float64

Sum sums all numbers in nums.

Types

This section is empty.

Jump to

Keyboard shortcuts

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