Documentation ¶
Overview ¶
Package utils provides common utility functions.
Provided functionalities: - sorting - comparators
Index ¶
- Constants
- Variables
- func CloseQuietly(closer io.Closer)
- func Copy(toValue interface{}, fromValue interface{}) (err error)
- func CopyWithOption(toValue interface{}, fromValue interface{}, opt Option) (err error)
- func ParseFloat(s string) float64
- func ParseInt(s string) int64
- func ParseUint(s string) uint64
- func ToString(value interface{}) string
- type Option
Constants ¶
View Source
const (
IGNORE_FLOAT = true
)
Variables ¶
Functions ¶
func Copy ¶ added in v1.1.9
func Copy(toValue interface{}, fromValue interface{}) (err error)
Copy copy things
func CopyWithOption ¶ added in v1.1.9
CopyWithOption copy with option
func ParseFloat ¶
Types ¶
type Option ¶ added in v1.1.9
type Option struct { // setting this value to true will ignore copying zero values of all the fields, including bools, as well as a // struct having all it's fields set to their zero values respectively (see IsZero() in reflect/value.go) IgnoreEmpty bool DeepCopy bool }
Option sets copy options
Click to show internal directories.
Click to hide internal directories.