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: tags.go
    path of file: ./repos/portmaster/process
    
    the code of the file until where you have to start completion: package process

import (
	"errors"
	"sync"

	"github.com/safing/portmaster/profile"
)

var (
	tagRegist
    
func RegisterTagHandler(th TagHandler) error {
	tagRegistryLock.Lock()
	defer tagRegistryLock.Unlock()

	// Check if the handler is already registered.
	for _, existingTH := range tagRegistry {
		if th.Name() == existingTH.Name() {
			return errors.New("already registered")
		}
	}

	tagRegistry = append(tagRegistry, th)
	return nil
}