Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
onecontext
✓ github.com/teivah/onecontext
Merge two contexts and access values from both.
package main
import (
"context"
"fmt"
"github.com/teivah/onecontext"
)
func main() {
ctx1 := context.WithValue(context.Background(), "key1", "value1")
ctx2 := context.WithValue(context.Background(), "key2", "value2")
merged, _ := onecontext.Merge(ctx1, ctx2)
fmt.Println(merged.Value("key1"), merged.Value("key2"))
}
Debug
Known issues
No known issues recorded.
Upgrade
Version history
1.3.0latest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.