this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

internal/mod/modzip: rename from internal/mod/zip

The name clash with archive/zip is annoying and lots of importers
used `modzip` as an alias. `modzip` is more descriptive and removes
that need.

Signed-off-by: Roger Peppe <rogpeppe@gmail.com>
Change-Id: I2ecf795ac99fd169ad542d5e726748a6f742f870
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1171760
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>

+12 -12
+2 -2
cue/load/registry.go
··· 12 12 "cuelang.org/go/internal/mod/modfile" 13 13 "cuelang.org/go/internal/mod/modregistry" 14 14 "cuelang.org/go/internal/mod/module" 15 - "cuelang.org/go/internal/mod/zip" 15 + "cuelang.org/go/internal/mod/modzip" 16 16 ) 17 17 18 18 // registryClient implements the protocol for talking to ··· 88 88 if _, err := io.Copy(f, r); err != nil { 89 89 return "", fmt.Errorf("cannot copy data to zip file %q: %v", zipfile, err) 90 90 } 91 - if err := zip.Unzip(modPath, mv, zipfile); err != nil { 91 + if err := modzip.Unzip(modPath, mv, zipfile); err != nil { 92 92 return "", fmt.Errorf("cannot unzip %v: %v", mv, err) 93 93 } 94 94 return modPath, nil
+1 -1
internal/mod/modmux/mux_test.go
··· 21 21 "cuelang.org/go/internal/mod/modregistry" 22 22 "cuelang.org/go/internal/mod/modresolve" 23 23 "cuelang.org/go/internal/mod/module" 24 - modzip "cuelang.org/go/internal/mod/zip" 24 + "cuelang.org/go/internal/mod/modzip" 25 25 "cuelang.org/go/internal/registrytest" 26 26 ) 27 27
+1 -1
internal/mod/modregistry/client.go
··· 32 32 33 33 "cuelang.org/go/internal/mod/modfile" 34 34 "cuelang.org/go/internal/mod/module" 35 - modzip "cuelang.org/go/internal/mod/zip" 35 + "cuelang.org/go/internal/mod/modzip" 36 36 ) 37 37 38 38 var ErrNotFound = fmt.Errorf("module not found")
+1 -1
internal/mod/modregistry/client_test.go
··· 30 30 "cuelabs.dev/go/oci/ociregistry/ocimem" 31 31 32 32 "cuelang.org/go/internal/mod/module" 33 - modzip "cuelang.org/go/internal/mod/zip" 33 + "cuelang.org/go/internal/mod/modzip" 34 34 ) 35 35 36 36 func newTestClient(t *testing.T) *Client {
internal/mod/zip/testdata/check_dir/empty.txt internal/mod/modzip/testdata/check_dir/empty.txt
internal/mod/zip/testdata/check_dir/various.txt internal/mod/modzip/testdata/check_dir/various.txt
internal/mod/zip/testdata/check_files/empty.txt internal/mod/modzip/testdata/check_files/empty.txt
internal/mod/zip/testdata/check_files/various.txt internal/mod/modzip/testdata/check_files/various.txt
internal/mod/zip/testdata/check_zip/empty.txt internal/mod/modzip/testdata/check_zip/empty.txt
internal/mod/zip/testdata/check_zip/various.txt internal/mod/modzip/testdata/check_zip/various.txt
internal/mod/zip/testdata/create/bad_file_path.txt internal/mod/modzip/testdata/create/bad_file_path.txt
internal/mod/zip/testdata/create/bad_gomod_case.txt internal/mod/modzip/testdata/create/bad_gomod_case.txt
internal/mod/zip/testdata/create/dup_file.txt internal/mod/modzip/testdata/create/dup_file.txt
internal/mod/zip/testdata/create/dup_file_and_dir.txt internal/mod/modzip/testdata/create/dup_file_and_dir.txt
internal/mod/zip/testdata/create/empty.txt internal/mod/modzip/testdata/create/empty.txt
internal/mod/zip/testdata/create/exclude_cap_go_mod_submodule.txt internal/mod/modzip/testdata/create/exclude_cap_go_mod_submodule.txt
internal/mod/zip/testdata/create/exclude_submodule.txt internal/mod/modzip/testdata/create/exclude_submodule.txt
internal/mod/zip/testdata/create/exclude_vendor.txt internal/mod/modzip/testdata/create/exclude_vendor.txt
internal/mod/zip/testdata/create/file_case_conflict.txt internal/mod/modzip/testdata/create/file_case_conflict.txt
internal/mod/zip/testdata/create/simple.txt internal/mod/modzip/testdata/create/simple.txt
internal/mod/zip/testdata/create_from_dir/bad_file_path.txt internal/mod/modzip/testdata/create_from_dir/bad_file_path.txt
internal/mod/zip/testdata/create_from_dir/bad_gomod_case.txt internal/mod/modzip/testdata/create_from_dir/bad_gomod_case.txt
internal/mod/zip/testdata/create_from_dir/empty.txt internal/mod/modzip/testdata/create_from_dir/empty.txt
internal/mod/zip/testdata/create_from_dir/exclude_submodule.txt internal/mod/modzip/testdata/create_from_dir/exclude_submodule.txt
internal/mod/zip/testdata/create_from_dir/exclude_vcs.txt internal/mod/modzip/testdata/create_from_dir/exclude_vcs.txt
internal/mod/zip/testdata/create_from_dir/exclude_vendor.txt internal/mod/modzip/testdata/create_from_dir/exclude_vendor.txt
internal/mod/zip/testdata/create_from_dir/simple.txt internal/mod/modzip/testdata/create_from_dir/simple.txt
internal/mod/zip/testdata/unzip/bad_file_path.txt internal/mod/modzip/testdata/unzip/bad_file_path.txt
internal/mod/zip/testdata/unzip/bad_gomod_case.txt internal/mod/modzip/testdata/unzip/bad_gomod_case.txt
internal/mod/zip/testdata/unzip/bad_submodule.txt internal/mod/modzip/testdata/unzip/bad_submodule.txt
internal/mod/zip/testdata/unzip/cap_go_mod_not_submodule.txt internal/mod/modzip/testdata/unzip/cap_go_mod_not_submodule.txt
internal/mod/zip/testdata/unzip/dup_file.txt internal/mod/modzip/testdata/unzip/dup_file.txt
internal/mod/zip/testdata/unzip/dup_file_and_dir.txt internal/mod/modzip/testdata/unzip/dup_file_and_dir.txt
internal/mod/zip/testdata/unzip/empty.txt internal/mod/modzip/testdata/unzip/empty.txt
internal/mod/zip/testdata/unzip/file_case_conflict.txt internal/mod/modzip/testdata/unzip/file_case_conflict.txt
internal/mod/zip/testdata/unzip/simple.txt internal/mod/modzip/testdata/unzip/simple.txt
+1 -1
internal/mod/zip/vendor_test.go internal/mod/modzip/vendor_test.go
··· 2 2 // Use of this source code is governed by a BSD-style 3 3 // license that can be found in the LICENSE file. 4 4 5 - package zip 5 + package modzip 6 6 7 7 import "testing" 8 8
+2 -2
internal/mod/zip/zip.go internal/mod/modzip/zip.go
··· 2 2 // Use of this source code is governed by a BSD-style 3 3 // license that can be found in the LICENSE file. 4 4 5 - // Package zip provides functions for creating and extracting module zip files. 5 + // Package modzip provides functions for creating and extracting module zip files. 6 6 // 7 7 // Module zip files have several restrictions listed below. These are necessary 8 8 // to ensure that module zip files can be extracted consistently on supported ··· 35 35 // 36 36 // Note that this package does not provide hashing functionality. See 37 37 // golang.org/x/mod/sumdb/dirhash. 38 - package zip 38 + package modzip 39 39 40 40 import ( 41 41 "archive/zip"
+2 -2
internal/mod/zip/zip_test.go internal/mod/modzip/zip_test.go
··· 2 2 // Use of this source code is governed by a BSD-style 3 3 // license that can be found in the LICENSE file. 4 4 5 - package zip_test 5 + package modzip_test 6 6 7 7 import ( 8 8 "archive/zip" ··· 22 22 23 23 "cuelang.org/go/internal/cuetest" 24 24 "cuelang.org/go/internal/mod/module" 25 - modzip "cuelang.org/go/internal/mod/zip" 25 + "cuelang.org/go/internal/mod/modzip" 26 26 "golang.org/x/mod/sumdb/dirhash" 27 27 "golang.org/x/tools/txtar" 28 28 )
+2 -2
internal/registrytest/registry.go
··· 23 23 "cuelang.org/go/internal/mod/modfile" 24 24 "cuelang.org/go/internal/mod/modregistry" 25 25 "cuelang.org/go/internal/mod/module" 26 - "cuelang.org/go/internal/mod/zip" 26 + "cuelang.org/go/internal/mod/modzip" 27 27 ) 28 28 29 29 // AuthConfig specifies authorization requirements for the server. ··· 219 219 } 220 220 221 221 func (c *moduleContent) writeZip(w io.Writer) error { 222 - return zip.Create[txtar.File](w, c.version, c.files, txtarFileIO{}) 222 + return modzip.Create[txtar.File](w, c.version, c.files, txtarFileIO{}) 223 223 } 224 224 225 225 func (c *moduleContent) init(ctx *cue.Context, versDir string) error {