qq1060656096 / err

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

err

import "github.com/qq1060656096/err"

err := err.NewErr("test", 500100100)
err.SetLocation()

webErr := err.NewWebErr(503, "http 503", 500100101)
webErr.SetLocation()

webErr = err.CustomUnprocessableEntity("参数错误", 422100100, nil)
webErr.SetLocation()

webErr = err.CustomInternalServerError("数据库连接失败", 500100102, nil)
webErr.SetLocation()

About

License:MIT License


Languages

Language:Go 100.0%