Skip to content

Releases: mautrix/go-util

v0.8.8

16 Jun 13:11
Compare
Choose a tag to compare
  • (requestlog) Added option to log X-Forwarded-For header value.
  • (exstrings) Added LongestSequenceOfFunc as a customizable version of LongestSequenceOf

v0.8.7

16 May 05:12
Compare
Choose a tag to compare
  • (jsonbytes) Added utility for url-safe base64 to complement the existing standard unpadded base64 marshaling utility.
  • (exstrings) Added LongestSequenceOf to find the longest sequence of a single character in a string.
  • (requestlog) Implemented Flush in CountingResponseWriter to 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

16 Mar 14:00
Compare
Choose a tag to compare
  • (curl) Added support for parsing cookies set using the -b flag, which recent versions of Chrome use.
  • (exstrings) Added functions for hashing and constant time comparing strings without copying to a byte array.

v0.8.5

16 Feb 15:16
Compare
Choose a tag to compare
  • Bumped minimum Go version to 1.23.
  • (dbutil) Deprecated NewRowIter as it encourages bad error handling. NewRowIterWithError and ConvertRowFn[T].NewRowIter are 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.Writer for byte slices without resizing.
  • (glob) Added ToRegexPattern helper which converts a glob to a regex without compiling it.

v0.8.4

16 Jan 09:58
Compare
Choose a tag to compare
  • (dbutil) Added option to retry transaction begin calls.
  • (dbutil) Added QueryHelper.QueryManyIter function to get a RowIter instead of pre-reading all rows into a list.
  • (jsontime) Added utilities for durations.

v0.8.3

16 Dec 13:50
Compare
Choose a tag to compare
  • (exhttp) Added global flag for disabling automatic CORS headers when using JSON response helper functions.

v0.8.2

16 Nov 14:03
Compare
Choose a tag to compare
  • (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.

v0.8.1

16 Oct 07:28
Compare
Choose a tag to compare
  • Breaking change (lottie) Improved interface to take a destination file name rather than returning bytes. The method was internally using a file anyway, so forcing reading it into memory was a waste.
  • (ffmpeg) Added ConvertPathWithDestination to specify destination file manually.
  • (exhttp) Added utility for applying middlewares to any HTTP handler.
  • (exfmt) Made duration formatting more customizable.
  • (dbutil) Changed table existence checks during schema upgrades to properly return errors instead of panicking.
  • (dbutil) Fixed sqlite-fkey-off transaction mode.

v0.8.0

16 Sep 10:40
Compare
Choose a tag to compare
  • (dbutil) Changed litestream package to allow importing as no-op even when cgo is disabled.
  • (ptr) Added NonZero and NonDefault helpers to get nil if the value is zero/default or a pointer to the value otherwise.
  • (ffmpeg) Fixed files not being removed if conversion fails.
  • (pblite) Added pblite (protobuf as JSON arrays) en/decoder.
  • (exhttp) Added utilities for JSON responses, CORS headers and other things.
  • (glob) Added utility for parsing Matrix globs into efficient matchers, with a fallback to regex for more complicated patterns.
  • (exsync) Added Size, Pop, ReplaceAll and AsList for Set.
  • (variationselector) Fixed plain numbers being emojified by Add.

v0.7.0

16 Aug 08:44
Compare
Choose a tag to compare
  • Bumped minimum Go version to 1.22.
  • (curl) Added Parse function to parse a curl command exported from browser devtools.
  • (exfmt) Moved FormatCurl to curl package.
  • (exslices) Added DeduplicateUnsorted utility for deduplicating items in a list while preserving order.
  • (exsync) Deprecated ReturnableOnce in favor of the standard library's sync.OnceValues.
  • (exsync) Added Event which works similar to Python's asyncio.Event.
  • (confusable) Added implementation of confusable detection from UTS #39.
  • (dbutil) Added deadlock detection option which panics if a database call is made without the appropriate transaction context in a goroutine which previously entered a database transaction.