From da6d797ce36c7352bd0e721832746c415eb3473c Mon Sep 17 00:00:00 2001 From: Saswata Mukherjee Date: Wed, 19 May 2021 18:57:02 +0530 Subject: [PATCH] Implement suggestions Signed-off-by: Saswata Mukherjee --- pkg/mdformatter/linktransformer/link.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/mdformatter/linktransformer/link.go b/pkg/mdformatter/linktransformer/link.go index a9d4e94..561fc34 100644 --- a/pkg/mdformatter/linktransformer/link.go +++ b/pkg/mdformatter/linktransformer/link.go @@ -203,11 +203,11 @@ func (v *validator) Close(ctx mdformatter.SourceContext) error { merr := merrors.New() base, err := os.Getwd() if err != nil { - merr.Add(errors.Wrapf(err, "could not resolve working dir")) + return errors.Wrap(err, "resolve working dir") } path, err := filepath.Rel(base, ctx.Filepath) if err != nil { - merr.Add(errors.Wrapf(err, "could not find relative path")) + return errors.Wrap(err, "find relative path") } for _, k := range keys {