From 03d87211559ece05e177b6f919f824ea2a42f31d Mon Sep 17 00:00:00 2001 From: Shashank Goyal Date: Sun, 20 Jan 2019 00:27:09 +0000 Subject: [PATCH] Fixed the sample code for naked return (#29001) Wrong function name and wrong variable name --- guide/english/go/functions/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/guide/english/go/functions/index.md b/guide/english/go/functions/index.md index b37e7a885f..f2c22b9445 100644 --- a/guide/english/go/functions/index.md +++ b/guide/english/go/functions/index.md @@ -75,12 +75,12 @@ You can name the return types so that you don't need to pass variable to the ret ```go func duplicate(s string) (first, second string) { first = s - last = s + second = s return } func main() { - fmt.Println(split("Hello world!")) // ("Hello world!", "Hello world!") + fmt.Println(duplicate("Hello world!")) // ("Hello world!", "Hello world!") } ```