aboutsummaryrefslogtreecommitdiff
path: root/lib/errors/errors.go
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-09-10 21:22:22 +0700
committerShulhan <ms@kilabit.info>2023-09-11 02:16:52 +0700
commit47b3910e4126553f7dedad16db1f94d0f9848ded (patch)
treef88b6c93d0b1e39a314db8d2486c8201f201d073 /lib/errors/errors.go
parentd0375fb5742ecd38d449d505c220caf34a46e98c (diff)
downloadpakakeh.go-47b3910e4126553f7dedad16db1f94d0f9848ded.tar.xz
lib/errors: realign struct E
This reduce the struct size from 56 to 40 bytes (-16 bytes).
Diffstat (limited to 'lib/errors/errors.go')
-rw-r--r--lib/errors/errors.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/errors/errors.go b/lib/errors/errors.go
index c76b764c..342dbef0 100644
--- a/lib/errors/errors.go
+++ b/lib/errors/errors.go
@@ -20,10 +20,10 @@ import (
// example, to provide a key as translation of Message into user's locale
// defined language.
type E struct {
- Code int `json:"code,omitempty"`
+ err error
Message string `json:"message,omitempty"`
Name string `json:"name,omitempty"`
- err error
+ Code int `json:"code,omitempty"`
}
// Internal define an error caused by server.