Documentation ¶
Overview ¶
关于Panic与recover的最佳实践
Index ¶
- func CheckPanic(err *error)
- func DoPanic() (err error)
- func FilterAccessId(accessId string) bool
- func GenTestArgs() (int, error)
- func MongoQueryMulti(args MongoQueryMultiArgs) (rst interface{}, err error)
- func NotifyFilterEntrence(accessId string) error
- func Printf(format string, a ...interface{}) (n int, err error)
- func RemoveRepByMap(slc []int) []int
- func ResetfInstance()
- func SliceToString(x interface{}) string
- func StartRecover()
- func StringToSlice(ss string) []string
- func TestSort()
- type IntSlice
- type MongoQueryMultiArgs
- type NotifyFilter
- type StringSlice
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FilterAccessId ¶
func GenTestArgs ¶
func MongoQueryMulti ¶
func MongoQueryMulti(args MongoQueryMultiArgs) (rst interface{}, err error)
反射版本的创建数组、append
func ResetfInstance ¶
func ResetfInstance()
func StartRecover ¶
func StartRecover()
func StringToSlice ¶
Types ¶
type MongoQueryMultiArgs ¶
type MongoQueryMultiArgs struct {
DecodeType interface{} // the point of Decode Type
}
type NotifyFilter ¶
type NotifyFilter struct {
// contains filtered or unexported fields
}
func NewNotifyFilter ¶
func NewNotifyFilter() *NotifyFilter
type StringSlice ¶
type StringSlice []string
这个类型需要实现sort接口的Len,Less和Swap方法 | 这是官方包的例子
func (StringSlice) Len ¶
func (x StringSlice) Len() int
func (StringSlice) Less ¶
func (x StringSlice) Less(i, j int) bool
func (StringSlice) Swap ¶
func (x StringSlice) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.