Add homedir to markfunc.go

This commit is contained in:
rwxrob 2022-04-18 11:34:38 -04:00
parent c804f69060
commit 0c2e737c18
No known key found for this signature in database
GPG Key ID: 2B9111F33082AE77

View File

@ -31,6 +31,7 @@ var markFuncMap = template.FuncMap{
"execonfdir": execonfdir,
"cachedir": cachedir,
"confdir": confdir,
"homedir": homedir,
}
func indent(n int, in string) string {
@ -47,6 +48,13 @@ func confdir() string {
return dir
}
func homedir(a ...string) string {
dir, _ := os.UserHomeDir()
extra := filepath.Join(a...)
path := filepath.Join(dir, extra)
return path
}
func exepath() string { return ExePath }
func exename() string { return ExeName }