You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: oci_dest.go
    path of file: ./repos/podman/vendor/github.com/containers/image/v5/oci/archive
    
    the code of the file until where you have to start completion: package archive

import (
	"context"
	"fmt"
	"io"
	"os"

	"github.com/containers/image/v5/internal/imagedestination"
	"github.com/containers/image/v5/internal/imagedestination/impl
    
func tarDirectory(src, dst string) error {
	// input is a stream of bytes from the archive of the directory at path
	input, err := archive.TarWithOptions(src, &archive.TarOptions{
		Compression: archive.Uncompressed,
		// Donâ€™t include the data about the user account this code is running under.
		ChownOpts: &idtools.IDPair{UID: 0, GID: 0},
	})
	if err != nil {
		return fmt.Errorf("retrieving stream of bytes from %q: %w", src, err)
	}
	defer input.Close()

	// creates the tar file
	outFile, err := os.Create(dst)
	if err != nil {
		return fmt.Errorf("creating tar file %q: %w", dst, err)
	}
	defer outFile.Close()

	// copies the contents of the directory to the tar file
	// TODO: This can take quite some time, and should ideally be cancellable using a context.Context.
	_, err = io.Copy(outFile, input)

	return err
}