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: operator_env.go
    path of file: ./repos/yq/pkg/yqlib
    
    the code of the file until where you have to start completion: package yqlib

import (
	"container/list"
	"fmt"
	"os"
	"strings"

	parse "github.com/a8m/envsubst/parse"
)

type envOpPreferences struct {
	StringValue bool
	NoUnset     bool
	NoEmpty     bool
	FailFast    bool
}

func envOperator(_ *dataTreeNavigator, context Context, expressionNode *ExpressionNode) (Context, error) {
	envName := expressionNode.Operation.CandidateNode.Value
	log.Debug("EnvOperator, env name:", envName)

	rawValue := os.Getenv(envName)

	pr
    
func envOperator(_ *dataTreeNavigator, context Context, expressionNode *ExpressionNode) (Context, error) {
	envName := expressionNode.Operation.CandidateNode.Value
	log.Debug("EnvOperator, env name:", envName)

	rawValue := os.Getenv(envName)

	preferences := expressionNode.Operation.Preferences.(envOpPreferences)

	var node *CandidateNode
	if preferences.StringValue {
		node = &CandidateNode{
			Kind:  ScalarNode,
			Tag:   "!!str",
			Value: rawValue,
		}
	} else if rawValue == "" {
		return Context{}, fmt.Errorf("value for env variable '%v' not provided in env()", envName)
	} else {
		decoder := NewYamlDecoder(ConfiguredYamlPreferences)
		if err := decoder.Init(strings.NewReader(rawValue)); err != nil {
			return Context{}, err
		}
		var err error
		node, err = decoder.Decode()

		if err != nil {
			return Context{}, err
		}

	}
	log.Debug("ENV tag", node.Tag)
	log.Debug("ENV value", node.Value)
	log.Debug("ENV Kind", node.Kind)

	return context.SingleChildContext(node), nil
}