gf/.example/errors/gerror/gerror5.go

23 lines
274 B
Go
Raw Normal View History

2019-07-13 16:41:23 +08:00
package main
import (
"errors"
2019-07-29 21:01:19 +08:00
"github.com/gogf/gf/os/glog"
2019-07-13 16:41:23 +08:00
2019-07-29 21:01:19 +08:00
"github.com/gogf/gf/errors/gerror"
2019-07-13 16:41:23 +08:00
)
func Error1() error {
return errors.New("test1")
}
func Error2() error {
return gerror.New("test2")
}
func main() {
glog.Println(Error1())
glog.Println(Error2())
}