When you need to mix in one (shorter-lived service) context.Context into another long-living context: kind of a “Y” joint. The opposite of Go's “⅄” pattern of deriving new contexts from existing contexts.
Why would you ever want to do this?
Because “someone” terribly messed up an API, grossly misusing contexts on them REST API client design spree.
Such as Podman's REST API client bindings.
(obligatory Captain Picard meme reference)
go get github.com/thediveo/wye
wye
supports versions of Go that are noted by the Go release
policy, that is, N and
N-1 major versions.
- to view the package documentation locally:
- either:
make pkgsite
, - or, in VSCode (using the VSCode-integrated simple browser): “Tasks: Run Task” ⇢ “View Go module documentation”.
- either:
make
shows the available make targets.
The module should have been named “waɪ”, but waɪ adding insult to injury by using a Unicode import path?
Copyright 2022 Harald Albrecht, licensed under the Apache License, Version 2.0.