mirror of
https://github.com/Fechin/reference.git
synced 2026-11-20 21:23:11 +03:00
Fixed typo in golang.md
This commit is contained in:
1 parent
c3f6ea754a
commit
e4898add53
1 file changed
+3
-1
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user