Jelajahi Sumber

remove aliases for deprecated pkg/urlutil

The aliases are included in the 22 release branch, so we can remove them
from master.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 2 tahun lalu
induk
melakukan
ce2abb82c0
3 mengubah file dengan 0 tambahan dan 33 penghapusan
  1. 0 6
      hack/make.ps1
  2. 0 6
      hack/validate/pkg-imports
  3. 0 21
      pkg/urlutil/deprecated.go

+ 0 - 6
hack/make.ps1

@@ -256,12 +256,6 @@ Function Validate-PkgImports($headCommit, $upstreamCommit) {
     $files=@(); $files = Invoke-Expression "git diff $upstreamCommit...$headCommit --diff-filter=ACMR --name-only -- `'pkg\*.go`'"
     $badFiles=@(); $files | ForEach-Object{
         $file=$_
-        if ($file -eq "pkg\urlutil\deprecated.go") {
-            # pkg/urlutil is deprecated, but has a temporary alias to help migration,
-            # see https://github.com/moby/moby/pull/43477
-            # TODO(thaJeztah) remove this exception once pkg/urlutil aliases are removed
-            return
-        }
         # For the current changed file, get its list of dependencies, sorted and uniqued.
         $imports = Invoke-Expression "go list -e -f `'{{ .Deps }}`' $file"
         if ($LASTEXITCODE -ne 0) { Throw "Failed go list for dependencies on $file" }

+ 0 - 6
hack/validate/pkg-imports

@@ -10,12 +10,6 @@ unset IFS
 
 badFiles=()
 for f in "${files[@]}"; do
-	if [ "$f" = "pkg/urlutil/deprecated.go" ]; then
-		# pkg/urlutil is deprecated, but has a temporary alias to help migration,
-		# see https://github.com/moby/moby/pull/43477
-		# TODO(thaJeztah) remove this exception once pkg/urlutil aliases are removed
-		continue
-	fi
 	IFS=$'\n'
 	badImports=($(go list -e -f '{{ join .Deps "\n" }}' "$f" | sort -u | grep -vE '^github.com/docker/docker/pkg/' | grep -vE '^github.com/docker/docker/vendor' | grep -E '^github.com/docker/docker' || true))
 	unset IFS

+ 0 - 21
pkg/urlutil/deprecated.go

@@ -1,21 +0,0 @@
-package urlutil // import "github.com/docker/docker/pkg/urlutil"
-
-import "github.com/docker/docker/builder/remotecontext/urlutil"
-
-// IsURL returns true if the provided str is an HTTP(S) URL.
-//
-// Deprecated: use github.com/docker/docker/builder/remotecontext/urlutil.IsURL
-// to detect build-context type, or use strings.HasPrefix() to check if the
-// string has a https:// or http:// prefix.
-func IsURL(str string) bool {
-	// TODO(thaJeztah) when removing this alias, remove the exception from hack/validate/pkg-imports and hack/make.ps1 (Validate-PkgImports)
-	return urlutil.IsURL(str)
-}
-
-// IsGitURL returns true if the provided str is a git repository URL.
-//
-// Deprecated: use github.com/docker/docker/builder/remotecontext/urlutil.IsGitURL
-func IsGitURL(str string) bool {
-	// TODO(thaJeztah) when removing this alias, remove the exception from hack/validate/pkg-imports and hack/make.ps1 (Validate-PkgImports)
-	return urlutil.IsGitURL(str)
-}