1 Star 1 Fork 0

1701 / gpa

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
errors.go 416 Bytes
一键复制 编辑 原始数据 按行查看 历史
1701 提交于 2021-07-09 11:23 . 完善
package dbutil
import "fmt"
// ErrParamIsEmpty SQL 的 in 参数是空时返回的错误
type ErrParamIsEmpty struct {
name string
}
func (e *ErrParamIsEmpty) Error() string {
return fmt.Sprintf("param %s shuld not be empty", e.name)
}
func NewErrParamIsEmpty(param string) error {
return &ErrParamIsEmpty{name: param}
}
func IsErrParamIsEmpty(err error) bool {
_, ok := err.(*ErrParamIsEmpty)
return ok
}
Go
1
https://gitee.com/knowgo/gpa.git
git@gitee.com:knowgo/gpa.git
knowgo
gpa
gpa
v0.2.14

搜索帮助

53164aa7 5694891 3bd8fe86 5694891