...

Package and

import "github.com/google/go-containerregistry/internal/and"
Overview
Index

Overview ▾

Package and provides helpers for adding Close to io.{Reader|Writer}.

type ReadCloser

ReadCloser implements io.ReadCloser by reading from a particular io.Reader and then calling the provided "Close()" method.

type ReadCloser struct {
    io.Reader
    CloseFunc func() error
}

func (*ReadCloser) Close

func (rac *ReadCloser) Close() error

Close implements io.ReadCloser

type WriteCloser

WriteCloser implements io.WriteCloser by reading from a particular io.Writer and then calling the provided "Close()" method.

type WriteCloser struct {
    io.Writer
    CloseFunc func() error
}

func (*WriteCloser) Close

func (wac *WriteCloser) Close() error

Close implements io.WriteCloser