mirror of
https://github.com/rwxrob/bonzai
synced 2024-11-12 07:10:26 +00:00
Add homedir to markfunc.go
This commit is contained in:
parent
c804f69060
commit
0c2e737c18
@ -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…
Reference in New Issue
Block a user