osutil
Package osutil exposes host and OS information. Node equivalent: os module helpers.
import "github.com/sahilkhaire/gox/osutil"
Select a symbol below — each page explains what it does, shows Node.js vs Go comparisons, and includes a runnable example.
Functions
| Symbol | Node.js | Kind | Summary |
|---|---|---|---|
| Arch | process.arch | func | Arch returns the architecture (runtime.GOARCH). |
| CPUs | os.cpus().length | func | CPUs returns the number of logical CPUs. |
| Homedir | os.homedir() | func | Homedir returns the current user's home directory. |
| Hostname | os.hostname() | func | Hostname returns the host name. |
| Platform | process.platform | func | Platform returns the OS (runtime.GOOS). |
| TempDir | os.tmpdir() | func | TempDir returns the default temp directory. |
| UserInfoNumeric | — | func | UserInfoNumeric is like UserInfo but parses uid/gid as ints when possible. |
Types
| Symbol | Node.js | Kind | Summary |
|---|---|---|---|
| User | — | type | User holds user identity fields when available (os.userInfo). |
Methods
| Symbol | Node.js | Kind | Summary |
|---|---|---|---|
| User.UserInfo | os.userInfo() | method | UserInfo returns the current user. |