Exercises
Test out what you have learned by trying to complete the following exercises:
- Read the documentation of the
fmtpackage usinggo doc. - In UNIX, an exit code of
0means success, whereas a non-zero exit code usually means failure. Try to modifywhich.goto do so with the help ofos.Exit(). - The current version of
which(1)stops after finding the first occurrence of the desired executable. Make the necessary code changes towhich.goin order to find all possible occurrences of the desired executable.