Based on various examples on the web and in the answer to this SO question, I am trying to figure out how it is possible for type ExitError from package os/exec to support the Sys() method even if the docs only mention the Error() method for this type.
I've guessed that the Sys() method in question is from type ProcessState in package os, but how does ExitError get to use it directly (exiterror.Sys()
) without having to use the full (exiterror.ProcessState.Sys()
)?
This must be a basic Go question but I've yet to figure out the answer to this one one my own...