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: reader_processor.go
    path of file: ./repos/flyte/flyteplugins/go/tasks/pluginmachinery/catalog
    
    the code of the file until where you have to start completion: package catalog

import (
	"context"
	"fmt"
	"reflect"

	"github.com/flyteorg/flyte/flyteidl/gen/pb-go/flyteidl/core"
	"github.com/flyteorg/flyte/flyteplugins/go/tasks/errors"
	"github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/io"
	"github.com/flyteorg/flyte/flyteplugins/go/tasks/pluginmachinery/workqueue"
	"github.com/flyteorg/flyte/flytestdlib/logger"
)

type ReaderWorkItem struct {
	// ReaderWorkItem outputs:
	cached bool

    
func (p ReaderProcessor) Process(ctx context.Context, workItem workqueue.WorkItem) (workqueue.WorkStatus, error) {
	wi, casted := workItem.(*ReaderWorkItem)
	if !casted {
		return workqueue.WorkStatusNotDone, fmt.Errorf("wrong work item type. Received: %v", reflect.TypeOf(workItem))
	}

	op, err := p.catalogClient.Get(ctx, wi.key)
	if err != nil {
		if IsNotFound(err) {
			logger.Infof(ctx, "Artifact not found in Catalog. Key: %v", wi.key)
			wi.cached = false
			return workqueue.WorkStatusSucceeded, nil
		}

		err = errors.Wrapf("CausedBy", err, "Failed to call catalog for Key: %v.", wi.key)
		logger.Warnf(ctx, "Cache call failed: %v", err)
		return workqueue.WorkStatusFailed, err
	}

	if op.status.GetCacheStatus() == core.CatalogCacheStatus_CACHE_LOOKUP_FAILURE {
		return workqueue.WorkStatusFailed, errors.Errorf(errors.DownstreamSystemError, "failed to lookup cache")
	}

	if op.status.GetCacheStatus() == core.CatalogCacheStatus_CACHE_MISS || op.GetOutputs() == nil {
		wi.cached = false
		return workqueue.WorkStatusSucceeded, nil
	}

	// TODO: Check task interface, if it has outputs but literalmap is empty (or not matching output), error.
	logger.Debugf(ctx, "Persisting output to %v", wi.outputsWriter.GetOutputPath())
	err = wi.outputsWriter.Put(ctx, op.GetOutputs())
	if err != nil {
		err = errors.Wrapf("CausedBy", err, "Failed to persist cached output for Key: %v.", wi.key)
		logger.Warnf(ctx, "Cache write to output writer failed: %v", err)
		return workqueue.WorkStatusFailed, err
	}

	wi.cached = true

	logger.Debugf(ctx, "Successfully read from catalog. Key [%v]", wi.key)
	return workqueue.WorkStatusSucceeded, nil
}