top | item 23555460

(no title)

eshyong | 5 years ago

Except that in Go, you always return the error alongside the value, like this:

    return 0, errors.New("unable to get price")
It's less elegant than Options but still, very common practice. GP's company clearly hasn't bought into Go if they're using a library that doesn't follow well-known conventions.

discuss

order

No comments yet.