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

import (
	"context"
	"encoding/json"
	"errors"
	"fmt"
	"os"
	"time"

	"github.com/spf13/cobra"
	helm_v3 "helm.sh/helm/v3/cmd/helm"
	"helm.sh/helm/v3/pkg/action"
	"helm.sh/helm/v3/pkg/registry"
	helmrelease "helm.sh/helm/v3/pkg/release"
	"helm.sh/
    
func getNamespaceAndRelease(ctx context.Context, gitFound bool, giterminismMgr giterminism_manager.Interface) (string, string, error) {
	namespaceSpecified := *commonCmdData.Namespace != ""
	releaseSpecified := *commonCmdData.Release != ""

	var namespace string
	var release string
	if common.GetUseDeployReport(&commonCmdData) {
		if namespaceSpecified || releaseSpecified {
			return "", "", fmt.Errorf("--namespace or --release can't be used together with --use-deploy-report")
		}

		deployReportPath, err := common.GetDeployReportPath(&commonCmdData)
		if err != nil {
			return "", "", fmt.Errorf("unable to get deploy report path: %w", err)
		}

		deployReportByte, err := os.ReadFile(deployReportPath)
		if err != nil {
			return "", "", fmt.Errorf("unable to read deploy report file %q: %w", deployReportPath, err)
		}

		var deployReport helmrelease.DeployReport
		if err := json.Unmarshal(deployReportByte, &deployReport); err != nil {
			return "", "", fmt.Errorf("unable to unmarshal deploy report file %q: %w", deployReportPath, err)
		}

		if deployReport.Namespace == "" {
			return "", "", fmt.Errorf("unable to get namespace from deploy report file %q", deployReportPath)
		}

		if deployReport.Release == "" {
			return "", "", fmt.Errorf("unable to get release from deploy report file %q", deployReportPath)
		}

		namespace = deployReport.Namespace
		release = deployReport.Release
	} else if gitFound {
		common.ProcessLogProjectDir(&commonCmdData, giterminismMgr.ProjectDir())

		_, werfConfig, err := common.GetRequiredWerfConfig(ctx, &commonCmdData, giterminismMgr, common.GetWerfConfigOptions(&commonCmdData, true))
		if err != nil {
			return "", "", fmt.Errorf("unable to load werf config: %w", err)
		}
		logboek.LogOptionalLn()

		namespace, err = deploy_params.GetKubernetesNamespace(*commonCmdData.Namespace, *commonCmdData.Environment, werfConfig)
		if err != nil {
			return "", "", err
		}

		release, err = deploy_params.GetHelmRelease(*commonCmdData.Release, *commonCmdData.Environment, namespace, werfConfig)
		if err != nil {
			return "", "", err
		}
	} else if !gitFound {
		if !namespaceSpecified && !releaseSpecified {
			return "", "", fmt.Errorf("no git with werf project found: dismiss should either be executed in a git repository, or with --namespace and --release specified, or with --use-deploy-report")
		} else if namespaceSpecified && !releaseSpecified {
			return "", "", fmt.Errorf("--namespace specified, but not --release, while should be specified both or none")
		} else if !namespaceSpecified && releaseSpecified {
			return "", "", fmt.Errorf("--release specified, but not --namespace, while should be specified both or none")
		}

		namespace = *commonCmdData.Namespace
		release = *commonCmdData.Release
	}

	return namespace, release, nil
}