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:
@ -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()
|
||||
|
Reference in New Issue
Block a user