xf

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Bool       = reflect.Bool
	Int        = reflect.Int
	Int8       = reflect.Int8
	Int16      = reflect.Int16
	Int32      = reflect.Int32
	Int64      = reflect.Int64
	Uint       = reflect.Uint
	Uint8      = reflect.Uint8
	Uint16     = reflect.Uint16
	Uint32     = reflect.Uint32
	Uint64     = reflect.Uint64
	Float32    = reflect.Float32
	Float64    = reflect.Float64
	Complex64  = reflect.Complex64
	Complex128 = reflect.Complex128
	Array      = reflect.Array
	Func       = reflect.Func
	Any        = reflect.Interface
	Map        = reflect.Map
	Slice      = reflect.Slice
	String     = reflect.String
	Struct     = reflect.Struct
)

Variables

View Source
var (
	BoolType    = reflect.TypeOf(bool(false))
	IntType     = reflect.TypeOf(int(0))
	Int8Type    = reflect.TypeOf(int8(0))
	Int16Type   = reflect.TypeOf(int16(0))
	Int32Type   = reflect.TypeOf(int32(0))
	Int64Type   = reflect.TypeOf(int64(0))
	UintType    = reflect.TypeOf(uint(0))
	Uint8Type   = reflect.TypeOf(uint8(0))
	Uint16Type  = reflect.TypeOf(uint16(0))
	Uint32Type  = reflect.TypeOf(uint32(0))
	Uint64Type  = reflect.TypeOf(uint64(0))
	Float32Type = reflect.TypeOf(float32(0))
	Float64Type = reflect.TypeOf(float64(0))
	AnyType     = reflect.TypeOf([]interface{}{}).Elem()
)

Functions

func C

func C(key string, v ...interface{}) interface{}

读写运行配置 v 支持1-2个参数 len(v) = 1时,v 可以设置为实际值、func() interface{}获取值的函数、reflect.Kind数据类型, 为reflect.kind时,为按kind类型转换返回结果, 当reflect.kind = struct时,转入的第三个参数为struct的reflect.Type类型

func CR

func CR(key string, def ...interface{}) t.T

读配置

func CW

func CW(key string, val interface{})

写配置

func TryEF added in v1.0.1

func TryEF(try func(ctx ...interface{}) error, ex func(err error, ctx ...interface{}) error, fi func(err error, ctx ...interface{}) error, ctx ...interface{}) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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