docker/tarfile/dest.go
func NewDestination(dest io.Writer, ref reference.NamedTagged) *Destination {
	repoTags := []reference.NamedTagged{}
	if ref != nil {
		repoTags = append(repoTags, ref)
	}
	return &Destination{
		writer:   dest,
		tar:      tar.NewWriter(dest),
		repoTags: repoTags,
		blobs:    make(map[digest.Digest]types.BlobInfo),
	}
}
func NewDestination(dest io.Writer, ref reference.NamedTagged) *Destination {
	repoTags := []reference.NamedTagged{}
	if ref != nil {
		repoTags = append(repoTags, ref)
	}
	return &Destination{
		writer:   dest,
		tar:      tar.NewWriter(dest),
		repoTags: repoTags,
		blobs:    make(map[digest.Digest]types.BlobInfo),
	}
}
func NewDestination ( dest io . Writer , ref reference . NamedTagged ) * Destination { repoTags := [ ] reference . NamedTagged { } if ref != nil { repoTags = append ( repoTags , ref ) } return & Destination { writer : dest , tar : tar . NewWriter ( dest ) , repoTags : repoTags , blobs : make ( map [ digest . Digest ] types . BlobInfo ) , } }
// NewDestination returns a tarfile.Destination for the specified io.Writer.
NewDestination returns a tarfile . Destination for the specified io . Writer .