feat: implemented service/transport/main layers

This commit is contained in:
Anatoly Antonov 2025-06-21 22:06:32 +03:00
parent 5158c5d7c9
commit bcb9ace54c
29 changed files with 804 additions and 393 deletions

View file

@ -0,0 +1,25 @@
package errcodes
import (
"strings"
)
type ErrorCode struct {
StatusCode int
Message string
Details string
}
var errorCodeCounter int32
func New(statusCode int, message string, details ...string) *ErrorCode {
return &ErrorCode{
StatusCode: statusCode,
Message: message,
Details: strings.Join(details, " "),
}
}
func (e *ErrorCode) Error() string {
return e.Message
}