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: unshare.go
    path of file: ./repos/sealer/vendor/github.com/containers/storage/pkg/unshare
    
    the code of the file until where you have to start completion: package unshare

import (
	"fmt"
	"os"
	"os/user"
	"sync"

	"github.com/sirupsen/logrus"
)

var (
	homeDirOnce sync.Once
	homeDirErr  error
	homeDir     string

	hasCapSysAdminOnce sync.Once
	ha
    
func bailOnError(err error, format string, a ...interface{}) { // nolint: golint,goprintffuncname
	if err != nil {
		if format != "" {
			logrus.Errorf("%s: %v", fmt.Sprintf(format, a...), err)
		} else {
			logrus.Errorf("%v", err)
		}
		os.Exit(1)
	}
}