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: add.go
    path of file: ./repos/werf/pkg/container_backend/instruction
    
    the code of the file until where you have to start completion: package instruction

import (
	"context"
	"fmt"

	"github.com/moby/buildkit/frontend/dockerfile/instructions"

	"github.com/werf/werf/pkg/buildah"
	"github.com/werf/werf/pkg/container_backend"
)

type Add struct {
	instructions.Ad
    
func (i *Add) Apply(ctx context.Context, containerName string, drv buildah.Buildah, drvOpts buildah.CommonOpts, buildContextArchive container_backend.BuildContextArchiver) error {
	var contextDir string
	if i.UsesBuildContext() {
		var err error
		contextDir, err = buildContextArchive.ExtractOrGetExtractedDir(ctx)
		if err != nil {
			return fmt.Errorf("unable to extract build context: %w", err)
		}
	}

	if err := drv.Add(ctx, containerName, i.SourcePaths, i.DestPath, buildah.AddOpts{
		CommonOpts: drvOpts,
		ContextDir: contextDir,
		Chown:      i.Chown,
		Chmod:      i.Chmod,
	}); err != nil {
		return fmt.Errorf("error adding %v to %s for container %s: %w", i.SourcePaths, i.DestPath, containerName, err)
	}

	return nil
}