]> Cypherpunks repositories - gostls13.git/commit
cmd/go/internal/modfetch: fix retractions slice initial length not zero
authorJames Yang <26634873@qq.com>
Tue, 23 May 2023 02:52:55 +0000 (02:52 +0000)
committerGopher Robot <gobot@golang.org>
Mon, 19 Jun 2023 20:30:05 +0000 (20:30 +0000)
commitbc21d6a4fcf2c957a3f279fa8725e16df6586864
tree38520d91f2b74ab7f1c85a284a5e0ef89d9f4539
parent261e26761805e03c126bf3934a8f39302e8d85fb
cmd/go/internal/modfetch: fix retractions slice initial length not zero

When make slice of retractions, it should have initial length zero, to append more VersionIntervals.

Currently without the zero length, the capacity used will be doubled after the appending, looks like a bug.

Change-Id: Id3acaeffe557ca1d15c864b0377a66fee3a41f6c
GitHub-Last-Rev: ed5fd5f6784c43195c531d8acc75560adff104ba
GitHub-Pull-Request: golang/go#60354
Reviewed-on: https://go-review.googlesource.com/c/go/+/497118
Auto-Submit: Bryan Mills <bcmills@google.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
src/cmd/go/internal/modfetch/coderepo.go