Releases: dyweb/gommon
Releases · dyweb/gommon
Structured logging w/ cli & json handler and source line
Mostly from #44
- support source line using
runtime
, code generation #43 is too complex for now - json format, manually concat bytes slice w/o using
encoding/json
andbytes.Buffer
- cli handler, color with delta time, delta time is using custom formatNum instead of fmt.Printf('%04d')
- introduced color package, though it's in util as a sub package
Support go template in generator
The generator package now can
- generate methods to meet the strange
log.LoggableStruct
interface - port support of go template from Ayi, previously logging level in log package is generated by
Ayi gotmpl
, now its part ofgommon generate
and defined ingommon.yml
without passing data in command line flag gommon generate
is using go's built inflag
package, instead ofcobra
, go's flag package is not very handy