Releases: satyrius/gonx
Releases · satyrius/gonx
v1.4.0
What's Changed
- Fix typos by @shawnps in #27 #28
- Provide a custom
StringParserto theReaderby @jeffw-wherethebitsroam in #32 #33 - Don't require format to be exhaustive by @haswalt in #34
- Expand
RegExby @severin-buerstel in #38 - Add
Fieldsmethod toEntrystruct 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
Filterinterface #19. It acts similar toReducer, but it is about limiting chain entries.- Has
Filter(*Entry) *Entrymethod to check is entry meets filter condition - Implements
Reducerinterface too, to be used in chains
- Has
Datetimefilter #19. Its based on this PR #11 by @pshevtsov- Introduce
StringParser#24 by @pshevtsov
Minor features
- Run test for
goversion up to1.5 - Linting fixes #13, #14 (thanks to @pshevtsov)
- More examples, espetially for reducers #17
- Use
goconveyfor tests
Bugfixes
- Fixed
Readerexamples #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,SumandCountwas introduces along withChainandGroupByreducers. Entrygot 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
*Entryinstead ofEntry MapReducereturnschan *Entryinstead ofchan interface{}and all reducers accept output channel aschan *EntryEntryis astruct, not amap[string]stringanymore and has two constructorsNewEntrythat acceptsFieldsandNewEmptyEntryEntry.Getwas renamed toEntry.Field
MapReduce
First stable release
Log reader type Reader with the following constructors
func NewReader(logFile io.Reader, format string) *Readerfunc 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)