Closed verygoodsoftwarenotvirus closed 9 years ago
log.Fatal
will call os.Exit(1)
for you, so you don't need to call it second time.
@pftbest good catch, I didn't know that, but have revised.
Nice, thank you!
Actually the very next example will also have no new variables on left side of :=
errors, e.g. because of x
, y
, l
and h
, but that one isn't meant to be run as-is so I think it's clearer not to change that one.
I noticed that when I copied the Hex example from the README, go gave me a
multiple-value colorful.Hex() in single-value context
error, and the source reveals thatcolorful.Hex()
will return an error if the string provided is invalid. Also present if you were to copy paste that whole chunk of code are multipleno new variables on left side of :=
errors, so I adjusted that as well.