Add homedir to markfunc.go

pull/97/head
rwxrob 2 years ago
parent c804f69060
commit 0c2e737c18
No known key found for this signature in database
GPG Key ID: 2B9111F33082AE77

@ -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 }

Loading…
Cancel
Save