diff --git a/internal/and/and_closer.go b/internal/and/and_closer.go index 52908e5cf..14a05eaa1 100644 --- a/internal/and/and_closer.go +++ b/internal/and/and_closer.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package and provides helpers for adding Close to io.{Reader|Writer}. package and import ( diff --git a/internal/estargz/estargz.go b/internal/estargz/estargz.go index 6404d3d95..35b1d8e7f 100644 --- a/internal/estargz/estargz.go +++ b/internal/estargz/estargz.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package estargz adapts the containerd estargz package to our abstractions. package estargz import ( @@ -33,7 +34,7 @@ var _ io.ReadCloser = (*estargz.Blob)(nil) // * An error if the estargz processing encountered a problem. // // Refer to estargz for the options: -// https://pkg.go.dev/github.com/containerd/stargz-snapshotter@v0.2.0/estargz#Option +// https://pkg.go.dev/github.com/containerd/stargz-snapshotter/estargz@v0.4.1#Option func ReadCloser(r io.ReadCloser, opts ...estargz.Option) (*estargz.Blob, v1.Hash, error) { defer r.Close() diff --git a/internal/gzip/zip.go b/internal/gzip/zip.go index bf1d66a56..e7d673ff6 100644 --- a/internal/gzip/zip.go +++ b/internal/gzip/zip.go @@ -12,6 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package gzip provides helper functions for interacting with gzipped streams. package gzip import ( @@ -72,7 +73,7 @@ func ReadCloserLevel(r io.ReadCloser, level int) io.ReadCloser { return pw.CloseWithError(err) } - // We dont' really care if these fail. + // We don't really care if these fail. defer pw.Close() defer r.Close() diff --git a/internal/verify/verify.go b/internal/verify/verify.go index d0bc8ac2a..444680380 100644 --- a/internal/verify/verify.go +++ b/internal/verify/verify.go @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// Package verify provides a ReadCloser that verifies content matches the +// expected hash values. package verify import ( diff --git a/pkg/v1/cache/cache.go b/pkg/v1/cache/cache.go index 54a0dc435..c4e752cec 100644 --- a/pkg/v1/cache/cache.go +++ b/pkg/v1/cache/cache.go @@ -77,7 +77,7 @@ func (l *lazyLayer) Compressed() (io.ReadCloser, error) { // Layer found in the cache. logs.Progress.Printf("Layer %s found (compressed) in cache", digest) return cl.Compressed() - } else if err != nil && err != ErrNotFound { + } else if err != ErrNotFound { return nil, err } @@ -99,7 +99,7 @@ func (l *lazyLayer) Uncompressed() (io.ReadCloser, error) { // Layer found in the cache. logs.Progress.Printf("Layer %s found (uncompressed) in cache", diffID) return cl.Uncompressed() - } else if err != nil && err != ErrNotFound { + } else if err != ErrNotFound { return nil, err }