Categorygithub.com/henrywhitaker3/ctxgen
modulepackage
1.0.1
Repository: https://github.com/henrywhitaker3/ctxgen.git
Documentation: pkg.go.dev

# README

Ctxgen

A package to store/retreive typed values from a context

ctx := context.Background()
ctx = ctxgen.WithValue(ctx, "bongo", 5)

...

value, ok := ctx.ValueOk[int](ctx, "bongo")
fmt.Println(value, ok) // prints 5 true

val := ctx.Value[int](ctx, "bingo")
fmt.Println(val) // prints 0

# Functions

No description provided by the author
No description provided by the author
No description provided by the author