tools

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package tools Created by guoxin in 2020/1/10 2:15 下午

Package tools Created by guoxin in 2020/1/10 11:16 上午

Package tools Created by guoxin in 2020/11/1 12:08 上午

Index

Constants

This section is empty.

Variables

View Source
var TypeConvert map[reflect.Kind]StrConvert

TypeConvert container

Functions

func ArrayConvert

func ArrayConvert(in string) (out interface{}, err error)

func BoolConvert

func BoolConvert(in string) (out interface{}, err error)

func Catch

func Catch()

func ChanConvert

func ChanConvert(in string) (out interface{}, err error)

func Complex128Convert

func Complex128Convert(in string) (out interface{}, err error)

func Complex64Convert

func Complex64Convert(in string) (out interface{}, err error)

func CopyMap

func CopyMap(source map[string]interface{}) map[string]interface{}

func CopyMap0

func CopyMap0(source map[interface{}]interface{}) map[interface{}]interface{}

func Float32Convert

func Float32Convert(in string) (out interface{}, err error)

func Float64Convert

func Float64Convert(in string) (out interface{}, err error)

func FuncConvert

func FuncConvert(in string) (out interface{}, err error)

func Int16Convert

func Int16Convert(in string) (out interface{}, err error)

func Int32Convert

func Int32Convert(in string) (out interface{}, err error)

func Int64Convert

func Int64Convert(in string) (out interface{}, err error)

func Int8Convert

func Int8Convert(in string) (out interface{}, err error)

func IntConvert

func IntConvert(in string) (out interface{}, err error)

func InterfaceConvert

func InterfaceConvert(in string) (out interface{}, err error)

func MapConvert

func MapConvert(in string) (out interface{}, err error)

func PtrConvert

func PtrConvert(in string) (out interface{}, err error)

func SliceConvert

func SliceConvert(in string) (out interface{}, err error)

func StringConvert

func StringConvert(in string) (out interface{}, err error)

func StructConvert

func StructConvert(in string) (out interface{}, err error)

func Uint16Convert

func Uint16Convert(in string) (out interface{}, err error)

func Uint32Convert

func Uint32Convert(in string) (out interface{}, err error)

func Uint64Convert

func Uint64Convert(in string) (out interface{}, err error)

func Uint8Convert

func Uint8Convert(in string) (out interface{}, err error)

func UintConvert

func UintConvert(in string) (out interface{}, err error)

func UintptrConvert

func UintptrConvert(in string) (out interface{}, err error)

Types

type ConcurrentMap

type ConcurrentMap struct {
	// contains filtered or unexported fields
}

func NewConcurrentMap

func NewConcurrentMap() *ConcurrentMap

func NewConcurrentMapData

func NewConcurrentMapData(source map[string]interface{}) *ConcurrentMap

func (*ConcurrentMap) Copy

func (this *ConcurrentMap) Copy() *ConcurrentMap

func (*ConcurrentMap) Get

func (this *ConcurrentMap) Get(key string) interface{}

func (*ConcurrentMap) GetAndRemoveMap

func (this *ConcurrentMap) GetAndRemoveMap() map[string]interface{}

GetAndRemoveMap 从ConcurrentMap中获得线程不安全map

func (*ConcurrentMap) GetMap

func (this *ConcurrentMap) GetMap() map[string]interface{}

* 从ConcurrentMap中获得线程不安全map

func (*ConcurrentMap) Merge

func (this *ConcurrentMap) Merge(source map[string]interface{})

func (*ConcurrentMap) Put

func (this *ConcurrentMap) Put(key string, value interface{})

func (*ConcurrentMap) Rm

func (this *ConcurrentMap) Rm(key string)

func (*ConcurrentMap) Size

func (this *ConcurrentMap) Size() int

type ConcurrentMap0

type ConcurrentMap0 struct {
	// contains filtered or unexported fields
}

ConcurrentMap0 key: interface value: interface

func NewConcurrentMap0

func NewConcurrentMap0() *ConcurrentMap0

func NewConcurrentMapData0

func NewConcurrentMapData0(source map[interface{}]interface{}) *ConcurrentMap0

func (*ConcurrentMap0) Copy

func (this *ConcurrentMap0) Copy() *ConcurrentMap0

func (*ConcurrentMap0) Get

func (this *ConcurrentMap0) Get(key interface{}) interface{}

func (*ConcurrentMap0) Merge

func (this *ConcurrentMap0) Merge(source map[interface{}]interface{})

func (*ConcurrentMap0) Put

func (this *ConcurrentMap0) Put(key interface{}, value interface{})

func (*ConcurrentMap0) Size

func (this *ConcurrentMap0) Size() int

type ExampleError

type ExampleError struct {
	// contains filtered or unexported fields
}

type StrConvert

type StrConvert func(in string) (out interface{}, err error)

type TryCatch

type TryCatch struct {
	// contains filtered or unexported fields
}

func (TryCatch) Catch

func (t TryCatch) Catch(e error, block func(err error)) TryCatch

func (TryCatch) CatchAll

func (t TryCatch) CatchAll(block func(err error)) TryCatch

func (TryCatch) Finally

func (t TryCatch) Finally(block func()) TryCatch

Finally 如果不需要Finally()请使用Run()

func (TryCatch) Run

func (t TryCatch) Run()

func (TryCatch) Try

func (t TryCatch) Try(block func()) TryCatch

Jump to

Keyboard shortcuts

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