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

import (
	"fmt"
	"regexp"
	"strings"

	buildtypes "github.com/loft-sh/devspace/pkg/devspace/build/types"
	"github.com/loft-sh/devspace/pkg/devspace/config/constants"
	"github.com/loft-sh/devspace/pkg/devspace/config/localcache"
	"github.com/loft-sh/devspace/pkg/devspace/imageselector"
	"github.com/loft-sh/devspace/pkg/util/dockerfile"

	config2 "github.com/loft-sh/dev
    
func ReplaceHelpers(value string, config config2.Config, dependencies []types.Dependency) (bool, interface{}, error) {
	// replace the image() helpers
	shouldRedeploy, value, err := replaceWithRegEx(value, func(match string) (bool, bool, string, error) {
		return resolveImage(match, config, dependencies, true, true, false)
	}, imageRegEx)
	if err != nil {
		return false, nil, err
	}

	// replace the tag() helpers
	imageShouldRedeploy := shouldRedeploy
	shouldRedeploy, value, err = replaceWithRegEx(value, func(match string) (bool, bool, string, error) {
		return resolveImage(match, config, dependencies, true, false, true)
	}, tagRegEx)
	if err != nil {
		return false, nil, err
	}

	return imageShouldRedeploy || shouldRedeploy, value, nil
}