From 08948d856f8b0ac49f150436eb025a8c3c65a570 Mon Sep 17 00:00:00 2001 From: lysu Date: Mon, 18 Mar 2019 12:29:50 +0800 Subject: [PATCH] errors: make errors.Trace mid-stack inlineable --- juju_adaptor.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/juju_adaptor.go b/juju_adaptor.go index 8bcfe2f..215b4b5 100644 --- a/juju_adaptor.go +++ b/juju_adaptor.go @@ -9,6 +9,9 @@ import ( // Trace just calls AddStack. func Trace(err error) error { + if err == nil { + return nil + } return AddStack(err) }