Repository: google/go-containerregistry
Pull request #983 (2021-04-16 17:40:14)

Move all internal/ packages to a root internal/
This will simplify my life a bit.


codecov-commenter: # [Codecov](https://codecov.io/gh/google/go-containerregistry/pull/983?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google) Report
> Merging [#983](https://codecov.io/gh/google/go-containerregistry/pull/983?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google) (94f805a) into [main](https://codecov.io/gh/google/go-containerregistry/commit/549ee62f0066e79b4b0eaad8689744d9ce5e2d15?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google) (549ee62) will **decrease** coverage by `0.03%`.
> The diff coverage is `n/a`.

> :exclamation: Current head 94f805a differs from pull request most recent head 66ff264. Consider uploading reports for the commit 66ff264 to get more accurate results
[![Impacted file tree graph](https://codecov.io/gh/google/go-containerregistry/pull/983/graphs/tree.svg?width=650&height=150&src=pr&token=wG7iiDCdZ4&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google)](https://codecov.io/gh/google/go-containerregistry/pull/983?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google)

```diff
@@            Coverage Diff             @@
##             main     #983      +/-   ##
==========================================
- Coverage   74.61%   74.58%   -0.04%     
==========================================
  Files         107      107              
  Lines        5027     5020       -7     
==========================================
- Hits         3751     3744       -7     
  Misses        721      721              
  Partials      555      555              
```


| [Impacted Files](https://codecov.io/gh/google/go-containerregistry/pull/983?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google) | Coverage Δ | |
|---|---|---|
| [internal/and/and\_closer.go](https://codecov.io/gh/google/go-containerregistry/pull/983/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google#diff-aW50ZXJuYWwvYW5kL2FuZF9jbG9zZXIuZ28=) | `100.00% <ø> (ø)` | |
| [internal/compare/image.go](https://codecov.io/gh/google/go-containerregistry/pull/983/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google#diff-aW50ZXJuYWwvY29tcGFyZS9pbWFnZS5nbw==) | `75.00% <ø> (ø)` | |
| [internal/compare/index.go](https://codecov.io/gh/google/go-containerregistry/pull/983/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google#diff-aW50ZXJuYWwvY29tcGFyZS9pbmRleC5nbw==) | `75.00% <ø> (ø)` | |
| [internal/compare/layer.go](https://codecov.io/gh/google/go-containerregistry/pull/983/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google#diff-aW50ZXJuYWwvY29tcGFyZS9sYXllci5nbw==) | `75.00% <ø> (ø)` | |
| [internal/estargz/estargz.go](https://codecov.io/gh/google/go-containerregistry/pull/983/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google#diff-aW50ZXJuYWwvZXN0YXJnei9lc3Rhcmd6Lmdv) | `100.00% <ø> (ø)` | |
| [internal/gzip/zip.go](https://codecov.io/gh/google/go-containerregistry/pull/983/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google#diff-aW50ZXJuYWwvZ3ppcC96aXAuZ28=) | `88.57% <ø> (ø)` | |
| [internal/legacy/copy.go](https://codecov.io/gh/google/go-containerregistry/pull/983/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google#diff-aW50ZXJuYWwvbGVnYWN5L2NvcHkuZ28=) | `56.25% <ø> (ø)` | |
| [internal/retry/retry.go](https://codecov.io/gh/google/go-containerregistry/pull/983/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google#diff-aW50ZXJuYWwvcmV0cnkvcmV0cnkuZ28=) | `100.00% <ø> (ø)` | |
| [internal/verify/verify.go](https://codecov.io/gh/google/go-containerregistry/pull/983/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google#diff-aW50ZXJuYWwvdmVyaWZ5L3ZlcmlmeS5nbw==) | `100.00% <ø> (ø)` | |
| [pkg/crane/copy.go](https://codecov.io/gh/google/go-containerregistry/pull/983/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google#diff-cGtnL2NyYW5lL2NvcHkuZ28=) | `51.21% <ø> (ø)` | |
| ... and [16 more](https://codecov.io/gh/google/go-containerregistry/pull/983/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/google/go-containerregistry/pull/983?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/google/go-containerregistry/pull/983?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google). Last update [549ee62...66ff264](https://codecov.io/gh/google/go-containerregistry/pull/983?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google).


Patch:
diff --git a/pkg/v1/internal/gzip/zip.go b/internal/gzip/zip.go
similarity index 98%
rename from pkg/v1/internal/gzip/zip.go
rename to internal/gzip/zip.go
index 6f7bfd93..bf1d66a5 100644
--- a/pkg/v1/internal/gzip/zip.go
+++ b/internal/gzip/zip.go
@@ -20,7 +20,7 @@ import (
 	"compress/gzip"
 	"io"
 
-	"github.com/google/go-containerregistry/pkg/v1/internal/and"
+	"github.com/google/go-containerregistry/internal/and"
 )
 
 var gzipMagicHeader = []byte{'\x1f', '\x8b'}
diff --git a/pkg/v1/internal/gzip/zip_test.go b/internal/gzip/zip_test.go
similarity index 100%
rename from pkg/v1/internal/gzip/zip_test.go
rename to internal/gzip/zip_test.go
diff --git a/pkg/internal/httptest/httptest.go b/internal/httptest/httptest.go
similarity index 100%
rename from pkg/internal/httptest/httptest.go
rename to internal/httptest/httptest.go
diff --git a/pkg/internal/legacy/copy.go b/internal/legacy/copy.go
similarity index 100%
rename from pkg/internal/legacy/copy.go
rename to internal/legacy/copy.go
diff --git a/pkg/internal/legacy/copy_test.go b/internal/legacy/copy_test.go
similarity index 100%
rename from pkg/internal/legacy/copy_test.go
rename to internal/legacy/copy_test.go
diff --git a/pkg/internal/redact/redact.go b/internal/redact/redact.go
similarity index 100%
rename from pkg/internal/redact/redact.go
rename to internal/redact/redact.go
diff --git a/pkg/internal/retry/retry.go b/internal/retry/retry.go
similarity index 97%
rename from pkg/internal/retry/retry.go
rename to internal/retry/retry.go
index 542ba49b..133cb1c1 100644
--- a/pkg/internal/retry/retry.go
+++ b/internal/retry/retry.go
@@ -20,7 +20,7 @@ import (
 	"context"
 	"fmt"
 
-	"github.com/google/go-containerregistry/pkg/internal/retry/wait"
+	"github.com/google/go-containerregistry/internal/retry/wait"
 )
 
 // Backoff is an alias of our own wait.Backoff to avoid name conflicts with
diff --git a/pkg/internal/retry/retry_test.go b/internal/retry/retry_test.go
similarity index 100%
rename from pkg/internal/retry/retry_test.go
rename to internal/retry/retry_test.go
diff --git a/pkg/internal/retry/wait/kubernetes_apimachinery_wait.go b/internal/retry/wait/kubernetes_apimachinery_wait.go
similarity index 100%
rename from pkg/internal/retry/wait/kubernetes_apimachinery_wait.go
rename to internal/retry/wait/kubernetes_apimachinery_wait.go
diff --git a/pkg/v1/internal/verify/verify.go b/internal/verify/verify.go
similarity index 96%
rename from pkg/v1/internal/verify/verify.go
rename to internal/verify/verify.go
index 366b6eef..d0bc8ac2 100644
--- a/pkg/v1/internal/verify/verify.go
+++ b/internal/verify/verify.go
@@ -20,8 +20,8 @@ import (
 	"hash"
 	"io"
 
+	"github.com/google/go-containerregistry/internal/and"
 	v1 "github.com/google/go-containerregistry/pkg/v1"
-	"github.com/google/go-containerregistry/pkg/v1/internal/and"
 )
 
 type verifyReader struct {
diff --git a/pkg/v1/internal/verify/verify_test.go b/internal/verify/verify_test.go
similarity index 100%
rename from pkg/v1/internal/verify/verify_test.go
rename to internal/verify/verify_test.go
diff --git a/pkg/crane/copy.go b/pkg/crane/copy.go
index ab73cb36..969b3d07 100644
--- a/pkg/crane/copy.go
+++ b/pkg/crane/copy.go
@@ -17,8 +17,8 @@ package crane
 import (
 	"fmt"
 
+	"github.com/google/go-containerregistry/internal/legacy"
 	"github.com/google/go-containerregistry/pkg/authn"
-	"github.com/google/go-containerregistry/pkg/internal/legacy"
 	"github.com/google/go-containerregistry/pkg/logs"
 	"github.com/google/go-containerregistry/pkg/name"
 	"github.com/google/go-containerregistry/pkg/v1/remote"
diff --git a/pkg/gcrane/copy.go b/pkg/gcrane/copy.go
index d3de1aa8..014e3077 100644
--- a/pkg/gcrane/copy.go
+++ b/pkg/gcrane/copy.go
@@ -21,9 +21,9 @@ import (
 	"strings"
 	"time"
 
+	"github.com/google/go-containerregistry/internal/retry"
 	"github.com/google/go-containerregistry/pkg/authn"
 	"github.com/google/go-containerregistry/pkg/crane"
-	"github.com/google/go-containerregistry/pkg/internal/retry"
 	"github.com/google/go-containerregistry/pkg/logs"
 	"github.com/google/go-containerregistry/pkg/name"
 	"github.com/google/go-containerregistry/pkg/v1/google"
diff --git a/pkg/registry/tls.go b/pkg/registry/tls.go
index d5e86192..cb2644e6 100644
--- a/pkg/registry/tls.go
+++ b/pkg/registry/tls.go
@@ -17,7 +17,7 @@ package registry
 import (
 	"net/http/httptest"
 
-	ggcrtest "github.com/google/go-containerregistry/pkg/internal/httptest"
+	ggcrtest "github.com/google/go-containerregistry/internal/httptest"
 )
 
 // TLS returns an httptest server, with an http client that has been configured to
diff --git a/pkg/v1/mutate/mutate.go b/pkg/v1/mutate/mutate.go
index 78b768fc..7336ed0a 100644
--- a/pkg/v1/mutate/mutate.go
+++ b/pkg/v1/mutate/mutate.go
@@ -24,9 +24,9 @@ import (
 	"strings"
 	"time"
 
+	"github.com/google/go-containerregistry/internal/gzip"
 	v1 "github.com/google/go-containerregistry/pkg/v1"
 	"github.com/google/go-containerregistry/pkg/v1/empty"
-	"github.com/google/go-containerregistry/pkg/v1/internal/gzip"
 	"github.com/google/go-containerregistry/pkg/v1/match"
 	"github.com/google/go-containerregistry/pkg/v1/tarball"
 	"github.com/google/go-containerregistry/pkg/v1/types"
diff --git a/pkg/v1/partial/compressed.go b/pkg/v1/partial/compressed.go
index 0a229557..2e6e548a 100644
--- a/pkg/v1/partial/compressed.go
+++ b/pkg/v1/partial/compressed.go
@@ -17,8 +17,8 @@ package partial
 import (
 	"io"
 
+	"github.com/google/go-containerregistry/internal/gzip"
 	v1 "github.com/google/go-containerregistry/pkg/v1"
-	"github.com/google/go-containerregistry/pkg/v1/internal/gzip"
 	"github.com/google/go-containerregistry/pkg/v1/types"
 )
 
diff --git a/pkg/v1/partial/uncompressed.go b/pkg/v1/partial/uncompressed.go
index 69cea61c..df20d3aa 100644
--- a/pkg/v1/partial/uncompressed.go
+++ b/pkg/v1/partial/uncompressed.go
@@ -19,8 +19,8 @@ import (
 	"io"
 	"sync"
 
+	"github.com/google/go-containerregistry/internal/gzip"
 	v1 "github.com/google/go-containerregistry/pkg/v1"
-	"github.com/google/go-containerregistry/pkg/v1/internal/gzip"
 	"github.com/google/go-containerregistry/pkg/v1/types"
 )
 
diff --git a/pkg/v1/remote/descriptor.go b/pkg/v1/remote/descriptor.go
index 6d7ecb71..2e0f9996 100644
--- a/pkg/v1/remote/descriptor.go
+++ b/pkg/v1/remote/descriptor.go
@@ -25,10 +25,10 @@ import (
 	"strconv"
 	"strings"
 
+	"github.com/google/go-containerregistry/internal/verify"
 	"github.com/google/go-containerregistry/pkg/logs"
 	"github.com/google/go-containerregistry/pkg/name"
 	v1 "github.com/google/go-containerregistry/pkg/v1"
-	"github.com/google/go-containerregistry/pkg/v1/internal/verify"
 	"github.com/google/go-containerregistry/pkg/v1/partial"
 	"github.com/google/go-containerregistry/pkg/v1/remote/transport"
 	"github.com/google/go-containerregistry/pkg/v1/types"
diff --git a/pkg/v1/remote/image.go b/pkg/v1/remote/image.go
index e04961e9..64472364 100644
--- a/pkg/v1/remote/image.go
+++ b/pkg/v1/remote/image.go
@@ -21,10 +21,10 @@ import (
 	"net/url"
 	"sync"
 
-	"github.com/google/go-containerregistry/pkg/internal/redact"
+	"github.com/google/go-containerregistry/internal/redact"
+	"github.com/google/go-containerregistry/internal/verify"
 	"github.com/google/go-containerregistry/pkg/name"
 	v1 "github.com/google/go-containerregistry/pkg/v1"
-	"github.com/google/go-containerregistry/pkg/v1/internal/verify"
 	"github.com/google/go-containerregistry/pkg/v1/partial"
 	"github.com/google/go-containerregistry/pkg/v1/remote/transport"
 	"github.com/google/go-containerregistry/pkg/v1/types"
diff --git a/pkg/v1/remote/layer.go b/pkg/v1/remote/layer.go
index 6a941a1a..89b0ede0 100644
--- a/pkg/v1/remote/layer.go
+++ b/pkg/v1/remote/layer.go
@@ -17,7 +17,7 @@ package remote
 import (
 	"io"
 
-	"github.com/google/go-containerregistry/pkg/internal/redact"
+	"github.com/google/go-containerregistry/internal/redact"
 	"github.com/google/go-containerregistry/pkg/name"
 	v1 "github.com/google/go-containerregistry/pkg/v1"
 	"github.com/google/go-containerregistry/pkg/v1/partial"
diff --git a/pkg/v1/remote/transport/bearer.go b/pkg/v1/remote/transport/bearer.go
index cd05509e..25099524 100644
--- a/pkg/v1/remote/transport/bearer.go
+++ b/pkg/v1/remote/transport/bearer.go
@@ -25,8 +25,8 @@ import (
 	"strings"
 
 	authchallenge "github.com/docker/distribution/registry/client/auth/challenge"
+	"github.com/google/go-containerregistry/internal/redact"
 	"github.com/google/go-containerregistry/pkg/authn"
-	"github.com/google/go-containerregistry/pkg/internal/redact"
 	"github.com/google/go-containerregistry/pkg/name"
 )
 
diff --git a/pkg/v1/remote/transport/error.go b/pkg/v1/remote/transport/error.go
index 49f44655..bb59d22e 100644
--- a/pkg/v1/remote/transport/error.go
+++ b/pkg/v1/remote/transport/error.go
@@ -100,7 +100,7 @@ func (e *Error) Temporary() bool {
 	return true
 }
 
-// TODO(jonjohnsonjr): Consider moving to pkg/internal/redact.
+// TODO(jonjohnsonjr): Consider moving to internal/redact.
 func redactURL(original *url.URL) *url.URL {
 	qs := original.Query()
 	for k, v := range qs {
diff --git a/pkg/v1/remote/transport/logger.go b/pkg/v1/remote/transport/logger.go
index 3b024866..c341f844 100644
--- a/pkg/v1/remote/transport/logger.go
+++ b/pkg/v1/remote/transport/logger.go
@@ -20,7 +20,7 @@ import (
 	"net/http/httputil"
 	"time"
 
-	"github.com/google/go-containerregistry/pkg/internal/redact"
+	"github.com/google/go-containerregistry/internal/redact"
 	"github.com/google/go-containerregistry/pkg/logs"
 )
 
diff --git a/pkg/v1/remote/transport/retry.go b/pkg/v1/remote/transport/retry.go
index 672622b6..7f7d1e45 100644
--- a/pkg/v1/remote/transport/retry.go
+++ b/pkg/v1/remote/transport/retry.go
@@ -18,7 +18,7 @@ import (
 	"net/http"
 	"time"
 
-	"github.com/google/go-containerregistry/pkg/internal/retry"
+	"github.com/google/go-containerregistry/internal/retry"
 )
 
 // Sleep for 0.1, 0.3, 0.9, 2.7 seconds. This should cover networking blips.
diff --git a/pkg/v1/remote/write.go b/pkg/v1/remote/write.go
index 9eddeedb..219afe51 100644
--- a/pkg/v1/remote/write.go
+++ b/pkg/v1/remote/write.go
@@ -26,8 +26,8 @@ import (
 	"sync/atomic"
 	"time"
 
-	"github.com/google/go-containerregistry/pkg/internal/redact"
-	"github.com/google/go-containerregistry/pkg/internal/retry"
+	"github.com/google/go-containerregistry/internal/redact"
+	"github.com/google/go-containerregistry/internal/retry"
 	"github.com/google/go-containerregistry/pkg/logs"
 	"github.com/google/go-containerregistry/pkg/name"
 	v1 "github.com/google/go-containerregistry/pkg/v1"
diff --git a/pkg/v1/tarball/image.go b/pkg/v1/tarball/image.go
index 08f7a812..2ffa7a6a 100644
--- a/pkg/v1/tarball/image.go
+++ b/pkg/v1/tarball/image.go
@@ -25,9 +25,9 @@ import (
 	"os"
 	"sync"
 
+	"github.com/google/go-containerregistry/internal/gzip"
 	"github.com/google/go-containerregistry/pkg/name"
 	v1 "github.com/google/go-containerregistry/pkg/v1"
-	"github.com/google/go-containerregistry/pkg/v1/internal/gzip"
 	"github.com/google/go-containerregistry/pkg/v1/partial"
 	"github.com/google/go-containerregistry/pkg/v1/types"
 )
diff --git a/pkg/v1/tarball/layer.go b/pkg/v1/tarball/layer.go
index dc8684ce..5ec1d551 100644
--- a/pkg/v1/tarball/layer.go
+++ b/pkg/v1/tarball/layer.go
@@ -23,10 +23,10 @@ import (
 	"sync"
 
 	"github.com/containerd/stargz-snapshotter/estargz"
+	"github.com/google/go-containerregistry/internal/and"
+	gestargz "github.com/google/go-containerregistry/internal/estargz"
+	ggzip "github.com/google/go-containerregistry/internal/gzip"
 	v1 "github.com/google/go-containerregistry/pkg/v1"
-	"github.com/google/go-containerregistry/pkg/v1/internal/and"
-	gestargz "github.com/google/go-containerregistry/pkg/v1/internal/estargz"
-	ggzip "github.com/google/go-containerregistry/pkg/v1/internal/gzip"
 	"github.com/google/go-containerregistry/pkg/v1/types"
 )
 


Test patch:
diff --git a/pkg/v1/internal/and/and_closer.go b/internal/and/and_closer.go
similarity index 100%
rename from pkg/v1/internal/and/and_closer.go
rename to internal/and/and_closer.go
diff --git a/pkg/v1/internal/and/and_closer_test.go b/internal/and/and_closer_test.go
similarity index 100%
rename from pkg/v1/internal/and/and_closer_test.go
rename to internal/and/and_closer_test.go
diff --git a/pkg/internal/compare/doc.go b/internal/compare/doc.go
similarity index 100%
rename from pkg/internal/compare/doc.go
rename to internal/compare/doc.go
diff --git a/pkg/internal/compare/image.go b/internal/compare/image.go
similarity index 100%
rename from pkg/internal/compare/image.go
rename to internal/compare/image.go
diff --git a/pkg/internal/compare/image_test.go b/internal/compare/image_test.go
similarity index 100%
rename from pkg/internal/compare/image_test.go
rename to internal/compare/image_test.go
diff --git a/pkg/internal/compare/index.go b/internal/compare/index.go
similarity index 100%
rename from pkg/internal/compare/index.go
rename to internal/compare/index.go
diff --git a/pkg/internal/compare/index_test.go b/internal/compare/index_test.go
similarity index 100%
rename from pkg/internal/compare/index_test.go
rename to internal/compare/index_test.go
diff --git a/pkg/internal/compare/layer.go b/internal/compare/layer.go
similarity index 100%
rename from pkg/internal/compare/layer.go
rename to internal/compare/layer.go
diff --git a/pkg/internal/compare/layer_test.go b/internal/compare/layer_test.go
similarity index 100%
rename from pkg/internal/compare/layer_test.go
rename to internal/compare/layer_test.go
diff --git a/pkg/v1/internal/estargz/estargz.go b/internal/estargz/estargz.go
similarity index 100%
rename from pkg/v1/internal/estargz/estargz.go
rename to internal/estargz/estargz.go
diff --git a/pkg/v1/internal/estargz/estargz_test.go b/internal/estargz/estargz_test.go
similarity index 97%
rename from pkg/v1/internal/estargz/estargz_test.go
rename to internal/estargz/estargz_test.go
index 65fe70d5..981784ce 100644
--- a/pkg/v1/internal/estargz/estargz_test.go
+++ b/internal/estargz/estargz_test.go
@@ -23,7 +23,7 @@ import (
 	"strings"
 	"testing"
 
-	"github.com/google/go-containerregistry/pkg/v1/internal/gzip"
+	"github.com/google/go-containerregistry/internal/gzip"
 )
 
 func TestReader(t *testing.T) {
diff --git a/pkg/crane/crane_test.go b/pkg/crane/crane_test.go
index bb2fedaf..fae334b5 100644
--- a/pkg/crane/crane_test.go
+++ b/pkg/crane/crane_test.go
@@ -28,9 +28,9 @@ import (
 	"strings"
 	"testing"
 
+	"github.com/google/go-containerregistry/internal/compare"
 	"github.com/google/go-containerregistry/pkg/authn"
 	"github.com/google/go-containerregistry/pkg/crane"
-	"github.com/google/go-containerregistry/pkg/internal/compare"
 	"github.com/google/go-containerregistry/pkg/name"
 	"github.com/google/go-containerregistry/pkg/registry"
 	v1 "github.com/google/go-containerregistry/pkg/v1"
diff --git a/pkg/gcrane/copy_test.go b/pkg/gcrane/copy_test.go
index 53153ed4..914209bb 100644
--- a/pkg/gcrane/copy_test.go
+++ b/pkg/gcrane/copy_test.go
@@ -29,8 +29,8 @@ import (
 	"time"
 
 	"github.com/google/go-cmp/cmp"
-	ggcrtest "github.com/google/go-containerregistry/pkg/internal/httptest"
-	"github.com/google/go-containerregistry/pkg/internal/retry"
+	ggcrtest "github.com/google/go-containerregistry/internal/httptest"
+	"github.com/google/go-containerregistry/internal/retry"
 	"github.com/google/go-containerregistry/pkg/logs"
 	"github.com/google/go-containerregistry/pkg/name"
 	"github.com/google/go-containerregistry/pkg/registry"
diff --git a/pkg/legacy/tarball/write_test.go b/pkg/legacy/tarball/write_test.go
index afaa0d5d..672133e3 100644
--- a/pkg/legacy/tarball/write_test.go
+++ b/pkg/legacy/tarball/write_test.go
@@ -24,7 +24,7 @@ import (
 	"strings"
 	"testing"
 
-	"github.com/google/go-containerregistry/pkg/internal/compare"
+	"github.com/google/go-containerregistry/internal/compare"
 	"github.com/google/go-containerregistry/pkg/name"
 	v1 "github.com/google/go-containerregistry/pkg/v1"
 	"github.com/google/go-containerregistry/pkg/v1/mutate"
diff --git a/pkg/v1/daemon/image_test.go b/pkg/v1/daemon/image_test.go
index 1e106bcd..660843fc 100644
--- a/pkg/v1/daemon/image_test.go
+++ b/pkg/v1/daemon/image_test.go
@@ -21,7 +21,7 @@ import (
 	"os"
 	"testing"
 
-	"github.com/google/go-containerregistry/pkg/internal/compare"
+	"github.com/google/go-containerregistry/internal/compare"
 	"github.com/google/go-containerregistry/pkg/name"
 
 	"github.com/google/go-containerregistry/pkg/v1/tarball"
diff --git a/pkg/v1/partial/compressed_test.go b/pkg/v1/partial/compressed_test.go
index 2167ea6d..72d7c013 100644
--- a/pkg/v1/partial/compressed_test.go
+++ b/pkg/v1/partial/compressed_test.go
@@ -19,7 +19,7 @@ import (
 	"testing"
 
 	"github.com/google/go-cmp/cmp"
-	"github.com/google/go-containerregistry/pkg/internal/compare"
+	"github.com/google/go-containerregistry/internal/compare"
 	"github.com/google/go-containerregistry/pkg/name"
 	"github.com/google/go-containerregistry/pkg/registry"
 	v1 "github.com/google/go-containerregistry/pkg/v1"
diff --git a/pkg/v1/partial/uncompressed_test.go b/pkg/v1/partial/uncompressed_test.go
index 3b8cedad..fe60b239 100644
--- a/pkg/v1/partial/uncompressed_test.go
+++ b/pkg/v1/partial/uncompressed_test.go
@@ -20,7 +20,7 @@ import (
 	"os"
 	"testing"
 
-	"github.com/google/go-containerregistry/pkg/internal/compare"
+	"github.com/google/go-containerregistry/internal/compare"
 	legacy "github.com/google/go-containerregistry/pkg/legacy/tarball"
 	"github.com/google/go-containerregistry/pkg/name"
 	v1 "github.com/google/go-containerregistry/pkg/v1"
diff --git a/pkg/v1/remote/layer_test.go b/pkg/v1/remote/layer_test.go
index afde497c..3dcd3998 100644
--- a/pkg/v1/remote/layer_test.go
+++ b/pkg/v1/remote/layer_test.go
@@ -20,7 +20,7 @@ import (
 	"net/url"
 	"testing"
 
-	"github.com/google/go-containerregistry/pkg/internal/compare"
+	"github.com/google/go-containerregistry/internal/compare"
 	"github.com/google/go-containerregistry/pkg/name"
 	"github.com/google/go-containerregistry/pkg/registry"
 	"github.com/google/go-containerregistry/pkg/v1/empty"
diff --git a/pkg/v1/remote/transport/logger_test.go b/pkg/v1/remote/transport/logger_test.go
index 98be15fd..c6513208 100644
--- a/pkg/v1/remote/transport/logger_test.go
+++ b/pkg/v1/remote/transport/logger_test.go
@@ -23,7 +23,7 @@ import (
 	"strings"
 	"testing"
 
-	"github.com/google/go-containerregistry/pkg/internal/redact"
+	"github.com/google/go-containerregistry/internal/redact"
 	"github.com/google/go-containerregistry/pkg/logs"
 )
 
diff --git a/pkg/v1/remote/transport/retry_test.go b/pkg/v1/remote/transport/retry_test.go
index 91cc02a8..3b9a1c9d 100644
--- a/pkg/v1/remote/transport/retry_test.go
+++ b/pkg/v1/remote/transport/retry_test.go
@@ -21,7 +21,7 @@ import (
 	"testing"
 	"time"
 
-	"github.com/google/go-containerregistry/pkg/internal/retry"
+	"github.com/google/go-containerregistry/internal/retry"
 )
 
 type mockTransport struct {
diff --git a/pkg/v1/tarball/layer_test.go b/pkg/v1/tarball/layer_test.go
index 5954c14c..e46d6181 100644
--- a/pkg/v1/tarball/layer_test.go
+++ b/pkg/v1/tarball/layer_test.go
@@ -23,7 +23,7 @@ import (
 	"testing"
 
 	"github.com/containerd/stargz-snapshotter/estargz"
-	"github.com/google/go-containerregistry/pkg/internal/compare"
+	"github.com/google/go-containerregistry/internal/compare"
 	"github.com/google/go-containerregistry/pkg/v1/validate"
 )
 
diff --git a/pkg/v1/tarball/write_test.go b/pkg/v1/tarball/write_test.go
index 4937d96a..4e94758a 100644
--- a/pkg/v1/tarball/write_test.go
+++ b/pkg/v1/tarball/write_test.go
@@ -25,7 +25,7 @@ import (
 	"strings"
 	"testing"
 
-	"github.com/google/go-containerregistry/pkg/internal/compare"
+	"github.com/google/go-containerregistry/internal/compare"
 	"github.com/google/go-containerregistry/pkg/name"
 	v1 "github.com/google/go-containerregistry/pkg/v1"
 	"github.com/google/go-containerregistry/pkg/v1/mutate"