Fixed typo in golang.md

This commit is contained in:
fechin committed 2022-11-24 15:15:05 +08:00
1 parent c3f6ea754a
commit e4898add53
1 file changed
+3 -1
+3 -1
View File
@@ -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) {