etcd-io / bbolt

An embedded key/value database for Go.
https://go.etcd.io/bbolt
MIT License
8.32k stars 644 forks source link

change FileMode var formatter to %s #774

Closed andyxning closed 5 months ago

andyxning commented 5 months ago

Change formatter for FileMode var to %s as it has implemented Stringer interface and the output is more readable.

Before(formatter is %x):

Opening db file (default-etcd/member/snap/db) with mode 2d72772d2d2d2d2d2d2d and with options: {Timeout: 0s, NoGrowSync: false, NoFreelistSync: true, PreLoadFreelist: false, FreelistType: , ReadOnly: false, MmapFlags: 8000, InitialMmapSize: 10737418240, PageSize: 0, NoSync: false, OpenFile: 0x0, Mlock: false, Logger: 0xc000398248}

After(formatter is %s):

Opening db file (default-etcd/member/snap/db) with mode -rw------- and with options: {Timeout: 0s, NoGrowSync: false, NoFreelistSync: true, PreLoadFreelist: false, FreelistType: , ReadOnly: false, MmapFlags: 8000, InitialMmapSize: 10737418240, PageSize: 0, NoSync: false, OpenFile: 0x0, Mlock: false, Logger: 0xc0004a8148}
tjungblu commented 5 months ago

/lgtm

thanks and really good find!