Note: The solution I'm going to present here is for private functions, a function that are well known to the author of the package; for example, a function that was split out of a larger funtion, in order to have cleaner code.
Functions in golang often returns an erorr value, letting the caller to deciede what to do with them. But there are cases where a binary response is not enough.
For example, let's say my software reads an optional configuration file for a non-critical activity. The implementation function for this activity will be totally OK with the absence of this configuration file. It will just exit with no error.