Releases: mautrix/go-util
Releases · mautrix/go-util
v0.9.2
- (progver) Added program version calculation utility like the one used by mautrix bridges and Meowlnir.
- (dbutil) Added
sqlite3-fk-wal-fullsyncdriver which is otherwise equivalent tosqlite3-fk-wal, but setsPRAGMA synchronous=FULLfor better crash resistance. - (dbutil) Added explicit error if comment prefix (
--) isn't at the start of the line when using dialect filters with the(lines commented)modifier. - (exsync) Added NewMapWithData, Clear, Len and CopyFrom methods for maps.
- (exsync) Added iterators for maps and sets.
- (jsontime) Changed
Unix*()methods andjsontime.U*Int()functions to treat 0 and the zerotime.Timevalue as the same.
v0.9.1
- (dbutil) Added general documentation.
- (random) Added
StringCharsetfor generating a random string with a custom character set andAppendSequencefor generating a random slice with a completely arbitrary types. - (exslices) Added methods for deduplicating a slice by custom key.
- (exsync) Added
WaitTimeoutCtxfor waiting for anEventwith both a timeout and a context.
v0.9.0
- Bumped minimum Go version to 1.24.
- Breaking change (exhttp) Refactored HandleErrors middleware to take raw response data instead of functions returning response data.
- (requestlog) Added option to recover and log panics.
- (exhttp) Added
syscall.EPIPEtoIsNetworkErrorchecks. - (exsync) Added
Notifymethod for waking up allEventwaiters without setting the flag. This is the atomic equivalent ofSet()immediately followed byClear(). - (exbytes) Added
UnsafeStringmethod for converting a byte slice to a string without copying. - (exstrings) Added
CollapseSpacesto replace multiple sequential spaces with one. - (exstrings) Added
PrefixByteRunLengthto count the number of occurrences of a given byte at the start of a string. - (base58) Fixed panic when input contains non-ASCII characters.
v0.8.8
v0.8.7
- (jsonbytes) Added utility for url-safe base64 to complement the existing standard unpadded base64 marshaling utility.
- (exstrings) Added
LongestSequenceOfto find the longest sequence of a single character in a string. - (requestlog) Implemented
FlushinCountingResponseWriterto fix flushing HTTP response buffer when using request logging. - (exhttp) Added utility for checking if a given error is a network error or an http2 stream error.
v0.8.6
v0.8.5
- Bumped minimum Go version to 1.23.
- (dbutil) Deprecated
NewRowIteras it encourages bad error handling.NewRowIterWithErrorandConvertRowFn[T].NewRowIterare recommended instead, as they support bundling an error inside the iterator. - (exslices) Added utility to map and filter a slice in one go.
- (confusable) Fixed skeleton incorrectly including replacement characters for some input strings.
- (exbytes) Added utility that implements
io.Writerfor byte slices without resizing. - (glob) Added
ToRegexPatternhelper which converts a glob to a regex without compiling it.
v0.8.4
v0.8.3
v0.8.2
- (ffmpeg) Added wrapper functions for
ffprobe. - (emojirunes) Added method to check if a string is only emojis.
- (unicodeurls) Updated data sheets used by emojirunes, variationselectors and other packages to Unicode 16.
- (dbutil) Added support for mass inserts with no static parameters.