-
Feature: Add
dlog.MaxLogLevel
function 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
WithoutCancel
method when using golang >= 1.21 -
Change: Remove the "without error" suffix when goroutines exit.
- Feature:
derror
: Implement a newtype MultiError []error
type for aggregating multiple errors together.
- Bugfix:
dlog
: v1.2.4 introduced a regression that broke existing external implementors of theLogger
interface. This has been fixed; implementations wishing to opt-in to v1.2.4's fast-logger behavior must now implement a distinctOptimizedLogger
interface, which is not protected by the usual compatibility promises.
-
Feature:
dlog
: Support deferring formatting of log messages to theLogger
backends, 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 newWithoutCancel
function 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.CreationFlags
includessyscall.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 ofdlog
functionality.
- Feature:
dlog
: A newNewTestContextWithOpts
function 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 theContext
is canceled for aCommand
for which.Start()
returned an error. -
Minor:
dhttp
: Have better connection-worker goroutine names. -
Chore: Our patches to
golang.org/x/net
have 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
dhttp
library. Thedutil
HTTP functions are considered deprecated in favor ofdhttp
. -
Change: Move
dutil.PanicToError
toderror.PanicToError
, with a compatibility alias atdutil.PanicToError
. -
Minor:
dcontext
:Context
s returned fromHardContext
now implementfmt.Stringer
for better debugability. -
Additionally, there are several news items regarding the now-deprecated
dutil
HTTP functions:- Feature: The HTTP functions now use
dlog
by default. - Bugfix: Correctly call
.Close()
on the underlyingnet/http.Server
upon 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
dtime
library. -
Change: Move
dutil.SleepWithContext
todtime.SleepWithContext
. This is a breaking change, but we allowed it anyway because it had only been around atdutil
for 12 days.
-
Feature: Initial public release. This is mostly all fairly mature code being open-sourced from Ambassador Edge Stack.
-
Featur: Add
dutil.SleepWithContext
implementing cancelable sleep.