In working with external code I hit the following. The code provided a function for looking up a product’s price, returning the price if available and a possible error:
func Price(product string) (float64, error)
It was a simple function, and the error case was sensible, unknown product, out of stock, etc. However, I discovered that when the item was discontinued the function…