parseutil

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: MPL-2.0 Imports: 11 Imported by: 38

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseAbsoluteTime added in v0.2.0

func ParseAbsoluteTime(in interface{}) (time.Time, error)

func ParseAddrs

func ParseAddrs(addrs interface{}) ([]*sockaddr.SockAddrMarshaler, error)

func ParseBool

func ParseBool(in interface{}) (bool, error)

func ParseCapacityString added in v0.2.0

func ParseCapacityString(in interface{}) (uint64, error)

ParseCapacityString parses a capacity string and returns the number of bytes it represents. Capacity strings are things like 5gib or 10MB. Supported prefixes are kb, kib, mb, mib, gb, gib, tb, tib, which are not case sensitive. If no prefix is present, the number is assumed to be in bytes already.

func ParseCommaStringSlice

func ParseCommaStringSlice(in interface{}) ([]string, error)

func ParseDurationSecond

func ParseDurationSecond(in interface{}) (time.Duration, error)

func ParseInt

func ParseInt(in interface{}) (int64, error)

func ParseString added in v0.2.0

func ParseString(in interface{}) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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