From 01fa4104b9c248c8945d14d9f128454d5b28d595 Mon Sep 17 00:00:00 2001 From: Uwe Dauernheim Date: Mon, 13 Jun 2016 11:17:47 +0900 Subject: [PATCH] Align code example documentation (#52) --- errors.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/errors.go b/errors.go index 817b936..65bf7a0 100644 --- a/errors.go +++ b/errors.go @@ -2,9 +2,9 @@ // // The traditional error handling idiom in Go is roughly akin to // -// if err != nil { -// return err -// } +// if err != nil { +// return err +// } // // which applied recursively up the call stack results in error reports // without context or debugging information. The errors package allows @@ -16,10 +16,10 @@ // The errors.Wrap function returns a new error that adds context to the // original error. For example // -// _, err := ioutil.ReadAll(r) -// if err != nil { -// return errors.Wrap(err, "read failed") -// } +// _, err := ioutil.ReadAll(r) +// if err != nil { +// return errors.Wrap(err, "read failed") +// } // // Retrieving the cause of an error //