File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -160,7 +160,7 @@ func (e *Error) Is(target error) bool {
160160// Unwrap returns cause of current error in case it is wrapped transparently, nil otherwise.
161161// See also: errors.Unwrap()
162162func (e * Error ) Unwrap () error {
163- if e .cause != nil && e .transparent {
163+ if e != nil && e .cause != nil && e .transparent {
164164 return e .cause
165165 } else {
166166 return nil
@@ -170,9 +170,9 @@ func (e *Error) Unwrap() error {
170170// Format implements the Formatter interface.
171171// Supported verbs:
172172//
173- // %s simple message output
174- // %v same as %s
175- // %+v full output complete with a stack trace
173+ // %s simple message output
174+ // %v same as %s
175+ // %+v full output complete with a stack trace
176176//
177177// In is nearly always preferable to use %+v format.
178178// If a stack trace is not required, it should be omitted at the moment of creation rather in formatting.
You can’t perform that action at this time.
0 commit comments