You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stat.Processes is type uint64, so you're trying to range over a type that is not iterable. You can only iterate over a few types with goprocinfo. Try ranging over stat.CPUStats instead.
func main() {
stat, err := linuxproc.ReadStat("/proc/stat")
Checkerr(err)
for _, s := range stat.Processes {
fmt.Println(s.Status.pid, s.Status.name, s.Cmdline)
}
}
cannot range over stat.Processes (type uint64)
The text was updated successfully, but these errors were encountered: