-
Feature: Add
dlog.MaxLogLevelfunction that returns the maximum log-level for the logger associated with the context. -
Bugfix: Removed dot import of "context" causing compile errors due to conflicting
WithoutCancelmethod when using golang >= 1.21 -
Change: Remove the "without error" suffix when goroutines exit.
- Feature:
derror: Implement a newtype MultiError []errortype for aggregating multiple errors together.
- Bugfix:
dlog: v1.2.4 introduced a regression that broke existing external implementors of theLoggerinterface. This has been fixed; implementations wishing to opt-in to v1.2.4's fast-logger behavior must now implement a distinctOptimizedLoggerinterface, which is not protected by the usual compatibility promises.
-
Feature:
dlog: Support deferring formatting of log messages to theLoggerbackends, so that if the log message would be dropped time isn't wasted formatting it just for the backend to drop it. This arguably should have triggered a v1.3.0 version bump. -
Feature:
dcontext: A newWithoutCancelfunction allows protecting an inner call from being canceled. This arguably should have triggered a v1.3.0 version bump. -
Feature:
derror:PanicToError: Implement Go 1.13 error unwrapping. This arguably should have triggered a v1.3.0 version bump. -
Bugfix:
dexec: Sort-of fix soft shutdown onGOOS=windows. It is only possible to perform soft cancelation ifcmd.SysProcAttr.CreationFlagsincludessyscall.CREATE_NEW_PROCESS_GROUP. Ifcmd.Start(ctx)detects that the Context is soft and that bit isn't set, then it returns an error rather than starting the process. -
Bugfix:
dcontext: Fix a bug whereHardContext(WithoutContext(ctx))can get canceled. -
Minor:
dlog: The default field order has changed. -
Minor:
dexec: Log when a signal is sent to the process. -
Chore: Sync all borrowed files from the stdlib up to Go 1.15.14 (from 1.15.5/1.15.6).
- Minor:
dexec: The log formatting is now improved to take advantage ofdlogfunctionality.
- Feature:
dlog: A newNewTestContextWithOptsfunction allows greater configurability of the created logger. This arguably should have triggered a v1.3.0 version bump.
-
Bugfix:
dexec: Fix a panic that occurs when theContextis canceled for aCommandfor which.Start()returned an error. -
Minor:
dhttp: Have better connection-worker goroutine names. -
Chore: Our patches to
golang.org/x/nethave been merged upstream, so we have upgraded to that and no longer include a bundled copy of it that includes our patches. This is not a user-facing change.
-
Feature: Introduce the
dhttplibrary. ThedutilHTTP functions are considered deprecated in favor ofdhttp. -
Change: Move
dutil.PanicToErrortoderror.PanicToError, with a compatibility alias atdutil.PanicToError. -
Minor:
dcontext:Contexts returned fromHardContextnow implementfmt.Stringerfor better debugability. -
Additionally, there are several news items regarding the now-deprecated
dutilHTTP functions:- Feature: The HTTP functions now use
dlogby default. - Bugfix: Correctly call
.Close()on the underlyingnet/http.Serverupon hard cancelation. - Bugfix: Document that it is an error to set
.BaseContext, detect this error condition and return an error if it is encountered. - Bugfix: Be more careful about leaking resources
- Feature: The HTTP functions now use
- Minor:
dgroup: Be more intelligent about when to include or not include stacktraces with errors.
-
Feature: Introduce the
dtimelibrary. -
Change: Move
dutil.SleepWithContexttodtime.SleepWithContext. This is a breaking change, but we allowed it anyway because it had only been around atdutilfor 12 days.
-
Feature: Initial public release. This is mostly all fairly mature code being open-sourced from Ambassador Edge Stack.
-
Featur: Add
dutil.SleepWithContextimplementing cancelable sleep.