mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 03:55:28 +08:00
fix a small typo
This commit is contained in:
@@ -31,7 +31,7 @@ func AppendByte(slice []byte, data ...byte) []byte {
|
||||
m := len(slice)
|
||||
n := m + len(data)
|
||||
if n > cap(slice) { // if necessary, reallocate
|
||||
// allocate doublke what's needed, for future growth.
|
||||
// allocate double what's needed, for future growth.
|
||||
newSlice := make([]byte, (n+1)*2)
|
||||
copy(newSlice, slice)
|
||||
slice = newSlice
|
||||
|
Reference in New Issue
Block a user