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: create_addon.go
    path of file: ./repos/porter/api/server/handlers/release
    
    the code of the file until where you have to start completion: package release

import (
	"context"
	"fmt"
	"net/http"

	"github.com/porter-dev/porter/api/server/authz"
	"github.com/porter-dev/porter/api/server/handlers"
	"github.com/porter-dev/porter/api/server/shared"
	"github.com/porter-dev/porter/api/server/shared/apierrors"
	"github.com/porter-dev/porter/api/server/shared/config"
	"github.com/porter-dev/porter/api/types"
	"github.com/porter-dev/porter/internal/analytics"
	"github.com/porter-dev/porter/internal/helm"
	"github.com/porter-dev/porter/internal/helm/loader"
	"github.com/porter-dev/porter/internal/models"
	"github.com/porter-dev/porter/internal/oauth"
	"github.com/porter-dev/porter/internal/telemetry"
	"github.com/stefanmcshane/helm/pkg/chart"
)

// Namespace_EnvironmentGroups is the base namespace for storing all environment groups.
const Namespace_EnvironmentGroups = "porter-env-group"

// Namespace_ACKSystem is the base namespace for interacting with ack chart controllers
const Namespace_ACKSystem = "ack-system"

type CreateAddonHandler struct {
	handlers.PorterHandlerReadWriter
	authz.KubernetesAgentGetter
}

func NewCreateAddonHandler
    
func LoadChart(ctx context.Context, config *config.Config, opts *LoadAddonChartOpts) (*chart.Chart, error) {
	// if the chart repo url is one of the specified application/addon charts, just load public
	if opts.RepoURL == config.ServerConf.DefaultAddonHelmRepoURL || opts.RepoURL == config.ServerConf.DefaultApplicationHelmRepoURL {
		return loader.LoadChartPublic(ctx, opts.RepoURL, opts.TemplateName, opts.TemplateVersion)
	} else {
		// load the helm repos in the project
		hrs, err := config.Repo.HelmRepo().ListHelmReposByProjectID(opts.ProjectID)
		if err != nil {
			return nil, err
		}

		for _, hr := range hrs {
			if hr.RepoURL == opts.RepoURL {
				if hr.BasicAuthIntegrationID != 0 {
					// read the basic integration id
					basic, err := config.Repo.BasicIntegration().ReadBasicIntegration(opts.ProjectID, hr.BasicAuthIntegrationID)
					if err != nil {
						return nil, err
					}

					return loader.LoadChart(ctx,
						&loader.BasicAuthClient{
							Username: string(basic.Username),
							Password: string(basic.Password),
						}, hr.RepoURL, opts.TemplateName, opts.TemplateVersion)
				} else {
					return loader.LoadChartPublic(ctx, hr.RepoURL, opts.TemplateName, opts.TemplateVersion)
				}
			}
		}
	}

	return nil, fmt.Errorf("chart repo not found")
}