fieldalignment of all structs to save memory

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2021-03-06 19:45:13 +03:00
parent cb70dfa664
commit bbbcb22565
65 changed files with 667 additions and 671 deletions

View File

@@ -37,10 +37,14 @@ var (
// Error type
type Error struct {
Id string
Code int32
// Id holds error id or service, usually someting like my_service or uuid
Id string
// Detail holds some useful details about error
Detail string
// Status usually holds text of http status
Status string
// Code holds error code
Code int32
}
// Error satisfies error interface
@@ -49,7 +53,7 @@ func (e *Error) Error() string {
return string(b)
}
// New generates a custom error.
// New generates a custom error
func New(id, detail string, code int32) error {
return &Error{
Id: id,