mirror of
https://github.com/go-task/task.git
synced 2025-11-29 22:48:03 +02:00
feat: add numCPU func (#1890)
This commit is contained in:
committed by
GitHub
parent
7bfddaa25a
commit
c381923d3e
@@ -17,8 +17,9 @@ var templateFuncs template.FuncMap
|
||||
|
||||
func init() {
|
||||
taskFuncs := template.FuncMap{
|
||||
"OS": func() string { return runtime.GOOS },
|
||||
"ARCH": func() string { return runtime.GOARCH },
|
||||
"OS": func() string { return runtime.GOOS },
|
||||
"ARCH": func() string { return runtime.GOARCH },
|
||||
"numCPU": func() int { return runtime.NumCPU() },
|
||||
"catLines": func(s string) string {
|
||||
s = strings.ReplaceAll(s, "\r\n", " ")
|
||||
return strings.ReplaceAll(s, "\n", " ")
|
||||
|
||||
Reference in New Issue
Block a user