xtypes

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2022 License: Apache-2.0 Imports: 7 Imported by: 26

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SMap

type SMap map[string]string

func (SMap) Del

func (m SMap) Del(key string)

func (SMap) Get

func (m SMap) Get(name string) string

func (SMap) GetWithDefault

func (m SMap) GetWithDefault(name string, def string) string

func (SMap) Keys

func (m SMap) Keys() []string

func (SMap) MarshalBinary

func (m SMap) MarshalBinary() (data []byte, err error)

func (SMap) Read

func (m SMap) Read(p []byte) (n int, err error)

func (SMap) Scan

func (m SMap) Scan(obj interface{}) error

func (SMap) Set

func (m SMap) Set(key, val string)

func (SMap) Translate

func (m SMap) Translate(tpl string) string

func (SMap) Values

func (m SMap) Values() map[string]string

type XMap

type XMap map[string]interface{}

func (XMap) Get

func (m XMap) Get(name string) (interface{}, bool)

Get 获取指定元素的值

func (XMap) GetBool

func (m XMap) GetBool(name string) bool

Get 获取指定元素的Bool值

func (XMap) GetFloat64 added in v0.1.2

func (m XMap) GetFloat64(key string) (float64, error)

func (XMap) GetInt added in v0.1.2

func (m XMap) GetInt(key string) (int, error)

func (XMap) GetInt64 added in v0.1.2

func (m XMap) GetInt64(key string) (int64, error)

func (XMap) GetString

func (m XMap) GetString(name string) string

Get 获取指定元素的值

func (XMap) IsEmpty

func (m XMap) IsEmpty() bool

func (XMap) Keys

func (m XMap) Keys() []string

Keys 从对象中获取数据值,如果不是字符串则返回空

func (XMap) Len

func (m XMap) Len() int

func (XMap) MarshalBinary

func (m XMap) MarshalBinary() (data []byte, err error)

func (XMap) Merge

func (m XMap) Merge(r XMap)

Merge 合并

func (XMap) SMap

func (m XMap) SMap() SMap

func (XMap) Scan

func (m XMap) Scan(obj interface{}) error

Scan 以json 标签进行序列化

func (XMap) Translate

func (m XMap) Translate(tpl string) string

type XMaps

type XMaps []XMap

func (*XMaps) Append

func (ms *XMaps) Append(i ...XMap) XMaps

func (XMaps) Get

func (ms XMaps) Get(idx int) XMap

func (XMaps) IsEmpty

func (ms XMaps) IsEmpty() bool

func (XMaps) Len

func (ms XMaps) Len() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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