chore: expose thoth in lib (#911)

Imports a patch previously exclusive to Botstopper.

Signed-off-by: Xe Iaso <me@xeiaso.net>
This commit is contained in:
Xe Iaso 2025-07-25 10:58:30 -04:00 committed by GitHub
parent 26b6d8a91a
commit 9affd2edf4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 12 additions and 10 deletions

View file

@ -1,14 +0,0 @@
package thoth
import "context"
type ctxKey struct{}
func With(ctx context.Context, cli *Client) context.Context {
return context.WithValue(ctx, ctxKey{}, cli)
}
func FromContext(ctx context.Context) (*Client, bool) {
cli, ok := ctx.Value(ctxKey{}).(*Client)
return cli, ok
}