Releases: satyrius/gonx
Releases · satyrius/gonx
v1.4.0
What's Changed
- Fix typos by @shawnps in #27 #28
- Provide a custom
StringParser
to theReader
by @jeffw-wherethebitsroam in #32 #33 - Don't require format to be exhaustive by @haswalt in #34
- Expand
RegEx
by @severin-buerstel in #38 - Add
Fields
method toEntry
struct to get all fields by @yaa110 in #40 - Fix parse log format that contains concatenated fields incorrect by @coldnight in #43
- Add function to return int values by @aman00323 in #49
New Contributors
- @shawnps made their first contribution in #27
- @jeffw-wherethebitsroam made their first contribution in #32
- @haswalt made their first contribution in #34
- @severin-buerstel made their first contribution in #38
- @yaa110 made their first contribution in #40
- @coldnight made their first contribution in #43
- @aman00323 made their first contribution in #49
Full Changelog: v1.3.0...v1.4.0
Filters
Major features
- Introduce
Filter
interface #19. It acts similar toReducer
, but it is about limiting chain entries.- Has
Filter(*Entry) *Entry
method to check is entry meets filter condition - Implements
Reducer
interface too, to be used in chains
- Has
Datetime
filter #19. Its based on this PR #11 by @pshevtsov- Introduce
StringParser
#24 by @pshevtsov
Minor features
- Run test for
go
version up to1.5
- Linting fixes #13, #14 (thanks to @pshevtsov)
- More examples, espetially for reducers #17
- Use
goconvey
for tests
Bugfixes
- Fixed
Reader
examples #21 - Long lines reading #23 by @pshevtsov
- Fix nginx conf parsing, deal with commented lines #25 by @jack1582
Hall of Glory
Special thanks to @pshevtsov for doing so much!
Parsing fix
- Parsing last value without quotes was fixed, #9
- Tested for Go v1.3
Bug fixes
Aggregation reducers
Whats new
- The aggregation reducers such as
Avg
,Sum
andCount
was introduces along withChain
andGroupBy
reducers. Entry
got some new mthods- Getters
Field(name string)
,FloatField(name string)
- Setters
SetField(name string, value string)
,SetFloatField(name string, value float64)
,SetUintField(name string, uint64)
- Utility methods
Merge(entry *Entry)
,FieldsHash(fields []string)
,Partial(fields []string)
- Getters
Backward incompatibilities
- All functions deals with
*Entry
instead ofEntry
MapReduce
returnschan *Entry
instead ofchan interface{}
and all reducers accept output channel aschan *Entry
Entry
is astruct
, not amap[string]string
anymore and has two constructorsNewEntry
that acceptsFields
andNewEmptyEntry
Entry.Get
was renamed toEntry.Field
MapReduce
First stable release
Log reader type Reader
with the following constructors
func NewReader(logFile io.Reader, format string) *Reader
func NewNginxReader(logFile io.Reader, nginxConf io.Reader, formatName string) (reader *Reader, err error)
And one interface method
func (r *Reader) Read() (record Entry, err error)