dict

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

This file was generated using gen.pl and go fmt.

dict is a helper function that allow one to easily get concreate values out of a map[string]interface{}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type M

type M map[string]interface{}

func (M) Dict

func (m M) Dict(key string) (v M, err error)

Dict is to obtain a map[string]interface{} that has already been cast to a M type.

func (M) Int

func (m M) Int(key string, def *int) (v int, err error)

Int returns the value as a int type, if it is unable to convert the value it will error. If the default value is not provided, and it can not find the value, it will return the zero value, and an error.

func (M) Int16

func (m M) Int16(key string, def *int16) (v int16, err error)

Int16 returns the value as a int16 type, if it is unable to convert the value it will error. If the default value is not provided, and it can not find the value, it will return the zero value, and an error.

func (M) Int16Slice

func (m M) Int16Slice(key string) (v []int16, err error)

func (M) Int32

func (m M) Int32(key string, def *int32) (v int32, err error)

Int32 returns the value as a int32 type, if it is unable to convert the value it will error. If the default value is not provided, and it can not find the value, it will return the zero value, and an error.

func (M) Int32Slice

func (m M) Int32Slice(key string) (v []int32, err error)

func (M) Int64

func (m M) Int64(key string, def *int64) (v int64, err error)

Int64 returns the value as a int64 type, if it is unable to convert the value it will error. If the default value is not provided, and it can not find the value, it will return the zero value, and an error.

func (M) Int64Slice

func (m M) Int64Slice(key string) (v []int64, err error)

func (M) Int8

func (m M) Int8(key string, def *int8) (v int8, err error)

Int8 returns the value as a int8 type, if it is unable to convert the value it will error. If the default value is not provided, and it can not find the value, it will return the zero value, and an error.

func (M) Int8Slice

func (m M) Int8Slice(key string) (v []int8, err error)

func (M) IntSlice

func (m M) IntSlice(key string) (v []int, err error)

func (M) String

func (m M) String(key string, def *string) (v string, err error)

String returns the value as a string type, if it is unable to convert the value it will error. If the default value is not provided, and it can not find the value, it will return the zero value, and an error.

func (M) StringSlice

func (m M) StringSlice(key string) (v []string, err error)

func (M) Uint

func (m M) Uint(key string, def *uint) (v uint, err error)

Uint returns the value as a uint type, if it is unable to convert the value it will error. If the default value is not provided, and it can not find the value, it will return the zero value, and an error.

func (M) Uint16

func (m M) Uint16(key string, def *uint16) (v uint16, err error)

Uint16 returns the value as a uint16 type, if it is unable to convert the value it will error. If the default value is not provided, and it can not find the value, it will return the zero value, and an error.

func (M) Uint16Slice

func (m M) Uint16Slice(key string) (v []uint16, err error)

func (M) Uint32

func (m M) Uint32(key string, def *uint32) (v uint32, err error)

Uint32 returns the value as a uint32 type, if it is unable to convert the value it will error. If the default value is not provided, and it can not find the value, it will return the zero value, and an error.

func (M) Uint32Slice

func (m M) Uint32Slice(key string) (v []uint32, err error)

func (M) Uint64

func (m M) Uint64(key string, def *uint64) (v uint64, err error)

Uint64 returns the value as a uint64 type, if it is unable to convert the value it will error. If the default value is not provided, and it can not find the value, it will return the zero value, and an error.

func (M) Uint64Slice

func (m M) Uint64Slice(key string) (v []uint64, err error)

func (M) Uint8

func (m M) Uint8(key string, def *uint8) (v uint8, err error)

Uint8 returns the value as a uint8 type, if it is unable to convert the value it will error. If the default value is not provided, and it can not find the value, it will return the zero value, and an error.

func (M) Uint8Slice

func (m M) Uint8Slice(key string) (v []uint8, err error)

func (M) UintSlice

func (m M) UintSlice(key string) (v []uint, err error)

Jump to

Keyboard shortcuts

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