aboutsummaryrefslogtreecommitdiff
path: root/lib/errors/errors.go
AgeCommit message (Collapse)Author
2025-01-23all: replace "interface{}" with "any"Shulhan
2023-09-11lib/errors: implement method IsShulhan
The Is method will return true if the target error is instance of *E and the value of field Code and Name match with values in e.
2023-09-11lib/errors: realign struct EShulhan
This reduce the struct size from 56 to 40 bytes (-16 bytes).
2022-05-09all: reformat all codes using gofmt 1.19 (the Go tip)Shulhan
2021-08-06lib/errrors: implement method AsShulhan
The As method will set the target to instance of E only if only target is **E.
2021-08-06Revert "lib/errors: return the internal error only if its not nil on Unwrap"Shulhan
This reverts commit 8379a3ac6385e811410ec512b414655926163c8d.
2021-07-30lib/errors: return the internal error only if its not nil on UnwrapShulhan
If the internal error is nil, the Unwrap method will return the instance of e itself.
2019-12-23errors: add field Name and errShulhan
The field Name is optional, intended to be consumed by program, for example, to provide a key as translation of Message into user's locale defined language. The err field is the underlying error.
2018-12-17lib/errors: new package for handling error with status codeShulhan