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: upgrade.go
    path of file: ./repos/devspace/pkg/devspace/config/versions/v1beta11
    
    the code of the file until where you have to start completion: package v1beta11

import (
	"fmt"
	"path"
	"strings"

	"github.com/loft-sh/devspace/pkg/devspace/pullsecrets"

	"github.com/loft-sh/devspace/pkg/util/ptr"

	"github.com/loft-sh/devspace/pkg/devspace/config/versions/config"
	next "github.com/loft-sh/devspace/pkg/devspace/config/versions/latest"
	"github.com/loft-sh/devspace/pkg/devspace/config/versions/util"
	"github.com/loft-sh/devspace/pkg/util/encoding"
	"github.com/loft-sh/de
    
func getMatchingDevContainer(devPod *next.DevPod, containerName string) *next.DevContainer {
	for key, container := range devPod.Containers {
		if container.Container == containerName || container.Container == "" {
			if container.Container == "" && containerName != "" {
				devContainer := container
				devContainer.Container = containerName
				delete(devPod.Containers, key)
				devPod.Containers[containerName] = devContainer
				return devPod.Containers[containerName]
			}
			return devPod.Containers[key]
		} else if containerName == "" {
			return devPod.Containers[key]
		}
	}

	if devPod.Containers == nil {
		devPod.Containers = map[string]*next.DevContainer{}
	}
	devPod.Containers[containerName] = &next.DevContainer{
		Container: containerName,
	}
	return devPod.Containers[containerName]
}