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: sysfunc.go
    path of file: ./repos/goutil/internal/comfunc
    
    the code of the file until where you have to start completion: package comfunc

import (
	"bytes"
	"os"
	"os/exec"
	"path/filepath"
	"strings"
)

// Workdir get
func Workdir() string {
	dir, _ := os.Getwd()
	return dir
}

// ExpandHome will parse first `~` as user home dir path.
f
    
func ExpandHome(pathStr string) string {
	if len(pathStr) == 0 {
		return pathStr
	}

	if pathStr[0] != '~' {
		return pathStr
	}

	if len(pathStr) > 1 && pathStr[1] != '/' && pathStr[1] != '\\' {
		return pathStr
	}

	homeDir, err := os.UserHomeDir()
	if err != nil {
		return pathStr
	}
	return homeDir + pathStr[1:]
}