tidwall / buntdb

BuntDB is an embeddable, in-memory key/value database for Go with custom indexing and geospatial support
MIT License
4.57k stars 289 forks source link

Constant errors #63

Closed faabiosr closed 3 years ago

faabiosr commented 4 years ago

Sentinel error value should behave as a constant, that is it should be immutable, and also block the error variable so that it is not overwritten.

sky126 commented 4 years ago

great

tidwall commented 3 years ago

I appreciate the suggestion but I like the var ... = error.New pattern better. Thanks.