Fix metadata context

This commit is contained in:
世界 committed 2024-10-30 14:01:13 +08:00
1 parent 327bb35ddd
commit 1a6047a61b
10 files changed
+15 -29

No files matched your search

-9
View File
@@ -91,15 +91,6 @@ func ContextFrom(ctx context.Context) *InboundContext {
return metadata.(*InboundContext)
}
func AppendContext(ctx context.Context) (context.Context, *InboundContext) {
metadata := ContextFrom(ctx)
if metadata != nil {
return ctx, metadata
}
metadata = new(InboundContext)
return WithContext(ctx, metadata), metadata
}
func ExtendContext(ctx context.Context) (context.Context, *InboundContext) {
var newMetadata InboundContext
if metadata := ContextFrom(ctx); metadata != nil {