Releases: AdguardTeam/golibs
Releases · AdguardTeam/golibs
v0.20.2
Added
- New type
ioutil.TruncatedWriter
.
v0.20.1
Changed
- On macOS, the
hostsfile.DefaultHostsPaths
function now returns theprivate/etc/hosts
directory instead of theetc/hosts
, which is an alias for theprivate/etc/hosts
on Darwin-based systems.
v0.20.0
Added
- Package
service
containing common helpers for long-running processes. - The corresponding package
testutil/fakeservice
for tests. osutil.ExitCode
helper alias and its corresponding constants.osutil.SignalNotifier
, an abstraction overos/signal.Notify
.- The new
logutil/slogutil.AdGuardLegacy
handler forlog/slog
logging.
v0.19.0
Added
- The
netutil.Prefix
wrapper fornetip.Prefix
.
Changed
- The
netutil.IPFromReversedAddr
now returns address asnetip.Addr
. - The
netutil.SubnetFromReversedAddr
has been changed tonetutil.PrefixFromReversedAddr
and now returnsnetip.Prefix
. - The
netutil.SubnetSet
and its related types and functions have been changed to work withnetip.Addr
andnetip.Prefix
types.
Removed
- The
netutil.CloneIPNet
andnetutil.SingleIPSubnet
functions. - The
netutil.ParseSubnet
andnetutil.ParseSubnets
functions.
v0.18.2
Added
-
New type
slogutil.JSONHybridHandler
for an alternative JSON handler of structured logs. -
New constant
httphdr.WWWAuthenticate
.
v0.18.1
Added
- New
syncutil.Semaphore
interface with its implementations:syncutil.EmptySemaphore
andsyncutil.ChanSemaphore
.
v0.18.0
Changed
- Iterating functions used as arguments to
hostsfile.DefaultStorage.RangeNames
andhostsfile.DefaultStorage.RangeAddrs
should now mark the cycle continuation with the returned boolean value.
Added
- The
Equal
method ofhostsfile.DefaultStorage
for comparison with each other.
v0.17.3
Added
- Package
osutil
. - New
hostsfile.Storage
interface and its default implementationhostsfile.DefaultStorage
. - New
slog.DiscardHandler
type.
v0.17.2
Added
- Package
logutil/slogutil
.