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: handler.go
    path of file: ./repos/podman/libpod/shutdown
    
    the code of the file until where you have to start completion: package shutdown

import (
	"errors"
	"os"
	"os/signal"
	"sync"
	"syscall"
	"time"

	logrusImport "github.com/sirupsen/logrus"
)

var (
	ErrHandlerExists = errors.New("handler with given name already exists")
)

var (
	stopped    bool
	sigChan    chan os.Si
    
func Register(name string, handler func(os.Signal) error) error {
	handlerLock.Lock()
	defer handlerLock.Unlock()

	if handlers == nil {
		handlers = make(map[string]func(os.Signal) error)
	}

	if _, ok := handlers[name]; ok {
		return ErrHandlerExists
	}

	handlers[name] = handler
	handlerOrder = append([]string{name}, handlerOrder...)

	return nil
}