t

package module
v0.0.0-...-16e8dd6 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2016 License: MIT Imports: 3 Imported by: 3

README

T

just collection of wrappers for easy use of golang map[string]interface{}

var m t.Map = make(map[string]interface{})
m["value"] = 1
m.Int("value") // --> 1
m.Str("value") // --> "1"
m["value"] = "123"
m.Int("value") // --> 123
m.Str("value") // --> "123"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map map[string]interface{}

func (Map) Bool

func (this Map) Bool(key string) bool

func (Map) Int

func (this Map) Int(key string) (n int)

func (Map) Int64

func (this Map) Int64(key string) (n int64)

func (Map) Map

func (this Map) Map(key string) (m Map)

func (Map) MarshalJSON

func (this Map) MarshalJSON() (b []byte, err error)

func (Map) Str

func (this Map) Str(key string) (s string)

func (Map) T

func (this Map) T(key string) (t T)

type T

type T struct {
	Value interface{}
}

func (T) Bool

func (this T) Bool() bool

Bool returns value of Value casted to bool. If Value is not bool type then returns false

func (T) Int

func (this T) Int() int

func (T) Int64

func (this T) Int64() int64

func (T) Map

func (this T) Map() Map

func (T) MarshalJSON

func (this T) MarshalJSON() (b []byte, err error)

func (T) String

func (this T) String() string

func (T) Uint

func (this T) Uint() uint

func (T) Uint64

func (this T) Uint64() uint64

Jump to

Keyboard shortcuts

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