Browse code

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 authored on 2022/10/06 09:48:42
Showing 3 changed files
... ...
@@ -256,12 +256,6 @@ Function Validate-PkgImports($headCommit, $upstreamCommit) {
256 256
     $files=@(); $files = Invoke-Expression "git diff $upstreamCommit...$headCommit --diff-filter=ACMR --name-only -- `'pkg\*.go`'"
257 257
     $badFiles=@(); $files | ForEach-Object{
258 258
         $file=$_
259
-        if ($file -eq "pkg\urlutil\deprecated.go") {
260
-            # pkg/urlutil is deprecated, but has a temporary alias to help migration,
261
-            # see https://github.com/moby/moby/pull/43477
262
-            # TODO(thaJeztah) remove this exception once pkg/urlutil aliases are removed
263
-            return
264
-        }
265 259
         # For the current changed file, get its list of dependencies, sorted and uniqued.
266 260
         $imports = Invoke-Expression "go list -e -f `'{{ .Deps }}`' $file"
267 261
         if ($LASTEXITCODE -ne 0) { Throw "Failed go list for dependencies on $file" }
... ...
@@ -10,12 +10,6 @@ unset IFS
10 10
 
11 11
 badFiles=()
12 12
 for f in "${files[@]}"; do
13
-	if [ "$f" = "pkg/urlutil/deprecated.go" ]; then
14
-		# pkg/urlutil is deprecated, but has a temporary alias to help migration,
15
-		# see https://github.com/moby/moby/pull/43477
16
-		# TODO(thaJeztah) remove this exception once pkg/urlutil aliases are removed
17
-		continue
18
-	fi
19 13
 	IFS=$'\n'
20 14
 	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))
21 15
 	unset IFS
22 16
deleted file mode 100644
... ...
@@ -1,21 +0,0 @@
1
-package urlutil // import "github.com/docker/docker/pkg/urlutil"
2
-
3
-import "github.com/docker/docker/builder/remotecontext/urlutil"
4
-
5
-// IsURL returns true if the provided str is an HTTP(S) URL.
6
-//
7
-// Deprecated: use github.com/docker/docker/builder/remotecontext/urlutil.IsURL
8
-// to detect build-context type, or use strings.HasPrefix() to check if the
9
-// string has a https:// or http:// prefix.
10
-func IsURL(str string) bool {
11
-	// TODO(thaJeztah) when removing this alias, remove the exception from hack/validate/pkg-imports and hack/make.ps1 (Validate-PkgImports)
12
-	return urlutil.IsURL(str)
13
-}
14
-
15
-// IsGitURL returns true if the provided str is a git repository URL.
16
-//
17
-// Deprecated: use github.com/docker/docker/builder/remotecontext/urlutil.IsGitURL
18
-func IsGitURL(str string) bool {
19
-	// TODO(thaJeztah) when removing this alias, remove the exception from hack/validate/pkg-imports and hack/make.ps1 (Validate-PkgImports)
20
-	return urlutil.IsGitURL(str)
21
-}