valueconverter

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Default

type Default struct{}

Default implements config.ValueConverter

func (*Default) ToBool

func (p *Default) ToBool(value interface{}) bool

ToBool parses a value into bool. It's used the function strconv.ParseBool to parse the value into bool

func (*Default) ToFloat

func (p *Default) ToFloat(value interface{}) float64

ToFloat parses a value into float64. It's used the function strconv.ParseFloat to parse the value into float

func (*Default) ToInt

func (p *Default) ToInt(value interface{}) int

ToInt parses a value into int. It's used the function strconv.ParseInt to parse the value into int

func (*Default) ToString

func (p *Default) ToString(value interface{}) string

ToString parse a value into string. It's used the package fmt to parse the value into string

func (*Default) ToStringSlice

func (p *Default) ToStringSlice(value interface{}) []string

ToStringSlice parses a value into string slice

Jump to

Keyboard shortcuts

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