Update project structure and build process

This commit is contained in:
Juan Pablo Civile
2025-05-13 11:10:08 -03:00
parent 124e9fa1bc
commit d9f3e925a4
277 changed files with 15321 additions and 930 deletions

View File

@@ -0,0 +1,28 @@
package errors
import (
"errors"
"fmt"
)
type Error struct {
err error
code int64
}
func (e *Error) Error() string {
return e.err.Error()
}
func (e *Error) Code() int64 {
return e.code
}
func New(code int64, msg string) error {
return &Error{errors.New(msg), code}
}
func Errorf(code int64, format string, a ...interface{}) error {
err := fmt.Errorf(format, a...)
return &Error{err, code}
}