simulator/base.go

20 lines
264 B
Go
Raw Permalink Normal View History

2019-01-24 10:17:40 +00:00
package simulator
import "log"
// must 处理err, 失败后panic
func must(err error) {
if err != nil {
panic(err)
}
}
// notMust 处理err, 失败后返回
func notMust(err error) bool {
if err != nil {
log.Fatalln(err)
return false
}
return true
}