mirror of
https://github.com/go-task/task.git
synced 2026-07-01 08:34:19 +00:00
feat: add numCPU func (#1890)
This commit is contained in:
committed by
GitHub
parent
7bfddaa25a
commit
c381923d3e
@@ -374,7 +374,8 @@ Lastly, Task itself provides a few functions:
|
||||
| Function | Description |
|
||||
| ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
||||
| `OS` | Returns the operating system. Possible values are `windows`, `linux`, `darwin` (macOS) and `freebsd`. |
|
||||
| `ARCH` | return the architecture Task was compiled to: `386`, `amd64`, `arm` or `s390x`. |
|
||||
| `ARCH` | Returns the architecture Task was compiled to: `386`, `amd64`, `arm` or `s390x`. |
|
||||
| `numCPU` | Returns the number of logical CPU's usable by the current process. |
|
||||
| `splitLines` | Splits Unix (`\n`) and Windows (`\r\n`) styled newlines. |
|
||||
| `catLines` | Replaces Unix (`\n`) and Windows (`\r\n`) styled newlines with a space. |
|
||||
| `toSlash` | Does nothing on Unix, but on Windows converts a string from `\` path format to `/`. |
|
||||
|
||||
Reference in New Issue
Block a user