Change-Id: Ic7b390935df107c5b7f53f9347a52031eac8a897
GitHub-Last-Rev:
a7194571e1c2f90537f1caa8a3b5bcd60cea60be
GitHub-Pull-Request: golang/go#66310
Reviewed-on: https://go-review.googlesource.com/c/go/+/571635
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: qiulaidongfeng <2645477756@qq.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
for j := i - 1; j >= ellipsis; j-- {
ip[j+n] = ip[j]
}
- for j := ellipsis + n - 1; j >= ellipsis; j-- {
- ip[j] = 0
- }
+ clear(ip[ellipsis : ellipsis+n])
} else if ellipsis >= 0 {
// Ellipsis must represent at least one 0 group.
return Addr{}, parseAddrError{in: in, msg: "the :: must expand to at least one field of zeros"}