webhelp.v1: gopkg.in/webhelp.v1/whparse Index | Files

package whparse

import "gopkg.in/webhelp.v1/whparse"

Package whparse provides some convenient input parsing helpers.

Index

Package Files

query.go

func OptBool Uses

func OptBool(val string, def bool) bool

OptBool parses val and returns the bool value in question, unless parsing fails, in which case the default def is returned.

func OptFloat32 Uses

func OptFloat32(val string, def float32) float32

OptFloat32 parses val and returns the float value in question, unless parsing fails, in which case the default def is returned.

func OptFloat64 Uses

func OptFloat64(val string, def float64) float64

OptFloat64 parses val and returns the float value in question, unless parsing fails, in which case the default def is returned.

func OptInt Uses

func OptInt(val string, def int) int

OptInt parses val and returns the integer value in question, unless parsing fails, in which case the default def is returned.

func OptInt32 Uses

func OptInt32(val string, def int32) int32

OptInt32 parses val and returns the integer value in question, unless parsing fails, in which case the default def is returned.

func OptInt64 Uses

func OptInt64(val string, def int64) int64

OptInt64 parses val and returns the integer value in question, unless parsing fails, in which case the default def is returned.

func OptUint Uses

func OptUint(val string, def uint) uint

OptUint parses val and returns the integer value in question, unless parsing fails, in which case the default def is returned.

func OptUint32 Uses

func OptUint32(val string, def uint32) uint32

OptUint32 parses val and returns the integer value in question, unless parsing fails, in which case the default def is returned.

func OptUint64 Uses

func OptUint64(val string, def uint64) uint64

OptUint64 parses val and returns the integer value in question, unless parsing fails, in which case the default def is returned.

func ParseBool Uses

func ParseBool(val string) (bool, error)

ParseBool is like strconv.ParseBool but also understands yes/no

Package whparse imports 2 packages (graph) and is imported by 1 packages. Updated 2017-06-05. Refresh now. Tools for package owners.