From efc97cb70c50880cbfce2146a21e77e9923a5e76 Mon Sep 17 00:00:00 2001 From: "Nguyen Ngoc Trung (Steven)" Date: Mon, 30 Dec 2019 15:41:20 -0800 Subject: [PATCH] Fix incorrect indentation (from spaces to tabs) --- CodeReviewComments.md | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/CodeReviewComments.md b/CodeReviewComments.md index 70cdf15b..c211ba59 100644 --- a/CodeReviewComments.md +++ b/CodeReviewComments.md @@ -113,21 +113,21 @@ and if you need text, print to hexadecimal or base64: ``` go import ( - "crypto/rand" - // "encoding/base64" - // "encoding/hex" - "fmt" + "crypto/rand" + // "encoding/base64" + // "encoding/hex" + "fmt" ) func Key() string { - buf := make([]byte, 16) - _, err := rand.Read(buf) - if err != nil { - panic(err) // out of randomness, should never happen - } - return fmt.Sprintf("%x", buf) - // or hex.EncodeToString(buf) - // or base64.StdEncoding.EncodeToString(buf) + buf := make([]byte, 16) + _, err := rand.Read(buf) + if err != nil { + panic(err) // out of randomness, should never happen + } + return fmt.Sprintf("%x", buf) + // or hex.EncodeToString(buf) + // or base64.StdEncoding.EncodeToString(buf) } ``` @@ -213,7 +213,7 @@ import ( "appengine/foo" "appengine/user" - "github.com/foo/bar" + "github.com/foo/bar" "rsc.io/goversion/version" ) ``` @@ -276,7 +276,7 @@ And encourages more robust and readable code: ``` go value, ok := Lookup(key) if !ok { - return fmt.Errorf("no value for %q", key) + return fmt.Errorf("no value for %q", key) } return Parse(value) ```