1
0
mirror of https://github.com/go-task/task.git synced 2025-06-25 00:47:04 +02:00

Add ExeExt template function

This commit is contained in:
Andrey Nering
2017-05-27 10:52:22 -03:00
parent 398a2c519c
commit 561349c820
2 changed files with 8 additions and 0 deletions

View File

@ -91,6 +91,12 @@ func init() {
"ToSlash": func(path string) string {
return filepath.ToSlash(path)
},
"ExeExt": func() string {
if runtime.GOOS == "windows" {
return ".exe"
}
return ""
},
}
templateFuncs = sprig.TxtFuncMap()