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

import (
	"fmt"
	"net"
	"net/http"
	"sort"
	"strings"

	"github.com/grafana/grafana/pkg/services/auth/identity"
)

const (
	// UserHeaderName name of the header used when forwarding the Grafana user login.
	U
    
func ApplyUserHeader(sendUserHeader bool, req *http.Request, user identity.Requester) {
	req.Header.Del(UserHeaderName)

	if !sendUserHeader || user == nil || user.IsNil() {
		return
	}

	namespace, _ := user.GetNamespacedID()
	switch namespace {
	case identity.NamespaceUser, identity.NamespaceServiceAccount:
		req.Header.Set(UserHeaderName, user.GetLogin())
	}
}