If a go program return error with Write()
, it returns something like this:
write failed(*fs.PathError): write mnt/test.dat: no space left on device
Is there anyway other than string matching for 'no space left on device', to know that a PathError is due to insufficient disk space?
Note: I am using Linux, and not caring about how it works on Windows.