bmatsuo / lmdb-go

Bindings for the LMDB C library
BSD 3-Clause "New" or "Revised" License
157 stars 59 forks source link

lmdb: remove direct dependency on the fmt package #73

Closed bmatsuo closed 8 years ago

bmatsuo commented 8 years ago

It was only being used in a couple places (outside of tests). So existing trivial usages of Errorf were replaced with errors.New and the OpError.Error method was rewritten to use string concatenation, which ends up being faster and using fewer allocations. Though in practice the performance of error message serialization is not going to impact an application in a stable production environment.