New returns a pointer to an Info struct that contains information about the CPUs on the host system
(args ...any)
| 139 | // New returns a pointer to an Info struct that contains information about the |
| 140 | // CPUs on the host system |
| 141 | func New(args ...any) (*Info, error) { |
| 142 | ctx := config.ContextFromArgs(args...) |
| 143 | info := &Info{} |
| 144 | if err := info.load(ctx); err != nil { |
| 145 | return nil, err |
| 146 | } |
| 147 | return info, nil |
| 148 | } |
| 149 | |
| 150 | // String returns a short string indicating a summary of CPU information |
| 151 | func (i *Info) String() string { |