From e2809bb6f773be64e547c55c84b970c11cb24048 Mon Sep 17 00:00:00 2001 From: Kalock Date: Sat, 29 Dec 2018 07:12:31 +0800 Subject: [PATCH] Update Translation for Chinese (#21990) --- guide/chinese/go/functions/index.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/guide/chinese/go/functions/index.md b/guide/chinese/go/functions/index.md index 66e34dbed9..32d248cb98 100644 --- a/guide/chinese/go/functions/index.md +++ b/guide/chinese/go/functions/index.md @@ -1,8 +1,8 @@ --- title: Go Functions -localeTitle: 去功能 +localeTitle: Go函数 --- -## 去功能 +## Go函数 函数接受任何类型的零个或多个参数,对它们执行某些逻辑并可能返回一个或多个值。 Golang的函数语法是: @@ -12,7 +12,7 @@ func sum(parameter1 int64, parameter2 int64) int64 { } ``` -这里,函数的名称是`add` 。它采用`int64`类型的参数, `parameter1`和`parameter2` 并返回另一个int64,这两个参数的总和。 +这里,函数的名称是`sum` 。它采用`int64`类型的参数, `parameter1`和`parameter2` 并返回另一个int64,这两个参数的总和。 ### 返回 @@ -82,7 +82,7 @@ helloWorld, bestLanguage := getHelloWorldAndBestLanguage() // bestLanguage == "Golang" ``` -### 裸体回报 +### 命名返回值 您可以命名返回类型,以便不需要将变量传递给return语句: @@ -100,4 +100,4 @@ func duplicate(s string) (first, second string) { #### 更多信息: -https://tour.golang.org/basics/4 \ No newline at end of file +https://tour.golang.org/basics/4