utils

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2016 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAsBool

func GetAsBool(value interface{}, defaultValue bool) (result bool, err error)

GetAsBool parses a string to a bool or returns the bool if bool is passed in

func GetAsFloat

func GetAsFloat(value interface{}, defaultValue float64) (result float64, err error)

GetAsFloat parses a string to a float or returns the float if float is passed in

func GetAsInt

func GetAsInt(value interface{}, defaultValue int) (result int, err error)

GetAsInt parses a string/float to an int or returns the int if int is passed in

func GetAsMap

func GetAsMap(value interface{}) (result map[string]string, err error)

GetAsMap parses a string to a map[string]string

func GetAsSlice

func GetAsSlice(value interface{}) (result []string, err error)

GetAsSlice : Parses a yaml array string to []string

func GetAsString

func GetAsString(value interface{}) (result string)

GetAsString parses a int/float to a string or returns the string if string is passed in

Types

This section is empty.

Jump to

Keyboard shortcuts

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