loader revisited

This commit is contained in:
Ilia Denisov
2026-03-16 19:52:02 +02:00
committed by GitHub
parent e6c6970947
commit 3f1776aa5f
30 changed files with 1581 additions and 527 deletions
+6 -1
View File
@@ -192,6 +192,11 @@ func (ge GenericError) Error() string {
return msg
}
// Unwrap returns the underlying error wrapped by GenericError, if any.
func (ge GenericError) Unwrap() error {
return ge.err
}
func newGenericError(code int, arg ...any) error {
e := &GenericError{Code: code}
if len(arg) > 0 {
@@ -207,7 +212,7 @@ func newGenericError(code int, arg ...any) error {
e.subject = asString(arg[i])
}
}
return *e
return e
}
func asString(v any) string {