util

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2016 License: BSD-3-Clause Imports: 6 Imported by: 5

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 added in v0.2.0

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

FillStruct converts map to struct. See http://stackoverflow.com/questions/26744873/converting-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 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