From e4898add53ba959d0671bebc11f48cf5973c7aa8 Mon Sep 17 00:00:00 2001 From: fechin Date: Thu, 24 Nov 2022 15:15:05 +0800 Subject: [PATCH] Fixed typo in golang.md --- source/_posts/golang.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/_posts/golang.md b/source/_posts/golang.md index 2993997..445fafa 100644 --- a/source/_posts/golang.md +++ b/source/_posts/golang.md @@ -599,7 +599,7 @@ r1, r2 := func() (string, string) { fmt.Println(r1, r2) ``` -### Named return +### Naked returns ```go func split(sum int) (x, y int) { @@ -613,6 +613,8 @@ fmt.Println(x) // => 7 fmt.Println(y) // => 10 ``` +Note that using naked returns hurts readability. + ### Variadic functions ```go func sum(nums ...int) {