To skip directories requires adding additional logic in the getMincore func, to tell the loop it should skip. I do this by returning errors. Since other cases were fataling, I made them return errors and the loop skip them too.
Since the loop skips pcStat entries, the size is not known in advance, so I initialize the stats slice with a capacity instead of a length, and use append to insert values in.
To skip directories requires adding additional logic in the
getMincore
func, to tell the loop it should skip. I do this by returning errors. Since other cases were fataling, I made them return errors and the loop skip them too.Since the loop skips
pcStat
entries, the size is not known in advance, so I initialize thestats
slice with a capacity instead of a length, and useappend
to insert values in.r: @tobert