diff options
| author | Shulhan <m.shulhan@gmail.com> | 2024-10-26 00:48:33 +0700 |
|---|---|---|
| committer | Shulhan <m.shulhan@gmail.com> | 2026-04-14 21:51:40 +0700 |
| commit | 8c0027ca7bde882aaa063044ac7c64ba5c7a6c92 (patch) | |
| tree | 3180813916ed48f0cd2c22a97561cf988f636e91 /src/archive/tar/reader_test.go | |
| parent | 66e8a77e30babe052c023320d85af4c126413da8 (diff) | |
| download | go-8c0027ca7bde882aaa063044ac7c64ba5c7a6c92.tar.xz | |
all: prealloc slice with possible minimum capabilities
Diffstat (limited to 'src/archive/tar/reader_test.go')
| -rw-r--r-- | src/archive/tar/reader_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/archive/tar/reader_test.go b/src/archive/tar/reader_test.go index a324674cb7..a99cce1991 100644 --- a/src/archive/tar/reader_test.go +++ b/src/archive/tar/reader_test.go @@ -791,7 +791,7 @@ func (rbs *readBadSeeker) Seek(int64, int) (int64, error) { return 0, fmt.Errorf // that truncated files are still detected even if the underlying io.Reader // satisfies io.Seeker. func TestReadTruncation(t *testing.T) { - var ss []string + ss := make([]string, 0, 4) for _, p := range []string{ "testdata/gnu.tar", "testdata/ustar-file-reg.tar", |
