mirror of
https://github.com/golang/go.git
synced 2025-05-05 23:53:05 +00:00
Updated CodeReviewComments (markdown)
parent
2ae2832309
commit
e3ee7b02ab
@ -53,7 +53,7 @@ and so on.
|
||||
|
||||
## Declaring Empty Slices
|
||||
|
||||
For a slice of strings, for example, prefer
|
||||
When declaring a slice, prefer
|
||||
```go
|
||||
var t []string
|
||||
```
|
||||
@ -62,7 +62,7 @@ to
|
||||
t := []string{}
|
||||
```
|
||||
|
||||
The former avoids allocating memory if the string is never appended to.
|
||||
The former avoids allocating memory if the slice is never appended to.
|
||||
|
||||
## Doc Comments
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user