Grammar correction

"it’s possible to pass a capacity explicitly as an additional parameter ot make"

"it’s possible to pass a capacity explicitly as an additional parameter **to** make"
This commit is contained in:
Michael Miller 2023-05-25 07:58:15 -04:00 committed by Michael Miller
parent 1512fb0094
commit d4af1256f0
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ func main() {
// By default a new slice's capacity is equal to its // By default a new slice's capacity is equal to its
// length; if we know the slice is going to grow ahead // length; if we know the slice is going to grow ahead
// of time, it's possible to pass a capacity explicitly // of time, it's possible to pass a capacity explicitly
// as an additional parameter ot `make`. // as an additional parameter to `make`.
s = make([]string, 3) s = make([]string, 3)
fmt.Println("emp:", s, "len:", len(s), "cap:", cap(s)) fmt.Println("emp:", s, "len:", len(s), "cap:", cap(s))

2
public/slices generated
View File

@ -95,7 +95,7 @@ the builtin <code>make</code>. Here we make a slice of
By default a new slice&rsquo;s capacity is equal to its By default a new slice&rsquo;s capacity is equal to its
length; if we know the slice is going to grow ahead length; if we know the slice is going to grow ahead
of time, it&rsquo;s possible to pass a capacity explicitly of time, it&rsquo;s possible to pass a capacity explicitly
as an additional parameter ot <code>make</code>.</p> as an additional parameter to <code>make</code>.</p>
</td> </td>
<td class="code leading"> <td class="code leading">