From b84cf79559b9af04d30fe86f1f8f7c30540058a7 Mon Sep 17 00:00:00 2001 From: Ricky Pai Date: Tue, 11 Feb 2020 13:11:10 -0800 Subject: [PATCH] add {} to not break syntax highlighting --- CodeReviewComments.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CodeReviewComments.md b/CodeReviewComments.md index c211ba59..59903eb6 100644 --- a/CodeReviewComments.md +++ b/CodeReviewComments.md @@ -431,15 +431,15 @@ Also see [Initialisms](https://github.com/golang/go/wiki/CodeReviewComments#init Consider what it will look like in godoc. Named result parameters like: ```go -func (n *Node) Parent1() (node *Node) -func (n *Node) Parent2() (node *Node, err error) +func (n *Node) Parent1() (node *Node) {} +func (n *Node) Parent2() (node *Node, err error) {} ``` will stutter in godoc; better to use: ```go -func (n *Node) Parent1() *Node -func (n *Node) Parent2() (*Node, error) +func (n *Node) Parent1() *Node {} +func (n *Node) Parent2() (*Node, error) {} ``` On the other hand, if a function returns two or three parameters of the same type,