Documentation ¶
Index ¶
- Variables
- func CanExpand(t reflect.Type) bool
- func CanInline(t reflect.Type) bool
- func CheckErr(err error, exit ...bool)
- func FormatTime(t time.Time, format ...string) string
- func FormatTlp(format string) string
- func GetAllMethod(st interface{}, fn func(numMethod int, m reflect.Method) error) error
- func GetBuff(ss ...int) *bytes.Buffer
- func GetField(v reflect.Value, i int) reflect.Value
- func IfVal(condition bool, trueVal, falseVal interface{}) interface{}
- func KillSignal() bool
- func LabelType(t reflect.Type) bool
- func Nonzero(v reflect.Value) bool
- func PutBuff(buffer *bytes.Buffer)
- func ReflectForNumField(v reflect.Value, ...) error
- func ReflectStructField(v reflect.Type, ...) error
- func RunAllMethod(st interface{}, args ...interface{}) (err error)
- func RunAssignMethod(st interface{}, filter func(methodName string) bool, args ...interface{}) (err error)
- func SetValue(vTypeOf reflect.Kind, vValueOf reflect.Value, value interface{}) (err error)
- func ToString(i interface{}) string
- func Try(fn func(), catch func(e interface{}), finally ...func())deprecated
- func TryCatch(fn func() error) (err error)
- func Zone(zone ...int) *time.Location
- type StringVariable
- type TimeEngine
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TimeTp = "2006-01-02 15:04:05" GetLocationName = func(zone int) string { switch zone { case 8: return "Asia/Shanghai" } return "UTC" } )
time time time 东八区
View Source
var (
BuffSize = bufTypes[3]
)
Functions ¶
func GetAllMethod ¶
GetAllMethod get all methods of struct
func IfVal ¶
func IfVal(condition bool, trueVal, falseVal interface{}) interface{}
IfVal Simulate ternary calculations, pay attention to handling no variables or indexing problems
func ReflectForNumField ¶
func ReflectStructField ¶
func RunAllMethod ¶
func RunAllMethod(st interface{}, args ...interface{}) (err error)
RunAllMethod run all methods of struct
func RunAssignMethod ¶
func RunAssignMethod(st interface{}, filter func(methodName string) bool, args ...interface{}) (err error)
RunAssignMethod run assign methods of struct
func Try
deprecated
func Try(fn func(), catch func(e interface{}), finally ...func())
Deprecated: please use TryCatch Try exception capture
Types ¶
type TimeEngine ¶
type TimeEngine struct {
// contains filtered or unexported fields
}
Directories ¶
Path | Synopsis |
---|---|
Package zjson json data read and write operations
|
Package zjson json data read and write operations |
Package zlog provide daily log service
|
Package zlog provide daily log service |
Package verify data verification
|
Package verify data verification |
Click to show internal directories.
Click to hide internal directories.