mirror of
https://github.com/golang/go
synced 2024-11-21 18:24:46 -07:00
effective_go: clarified small comment
R=rsc, cw CC=golang-dev https://golang.org/cl/217085
This commit is contained in:
parent
e465ad3cbd
commit
766c3ff735
@ -943,7 +943,7 @@ These examples illustrate the difference between <code>new()</code> and
|
||||
|
||||
<pre>
|
||||
var p *[]int = new([]int) // allocates slice structure; *p == nil; rarely useful
|
||||
var v []int = make([]int, 100) // v now refers to a new array of 100 ints
|
||||
var v []int = make([]int, 100) // the slice v now refers to a new array of 100 ints
|
||||
|
||||
// Unnecessarily complex:
|
||||
var p *[]int = new([]int)
|
||||
|
Loading…
Reference in New Issue
Block a user