style(go-pkg): rename package

This commit is contained in:
pyihe
2022-03-10 11:47:35 +08:00
parent 360a014dde
commit ab921f7824
51 changed files with 100 additions and 100 deletions

24
errors/error.go Normal file
View File

@@ -0,0 +1,24 @@
package errors
type Error struct {
err string
code int32
}
func New(err string, codes ...int32) error {
e := &Error{
err: err,
}
if len(codes) > 0 {
e.code = codes[0]
}
return e
}
func (e *Error) Error() (err string) {
return e.err
}
func (e *Error) Code() int32 {
return e.code
}