Fix "Fix metadata context"

This commit is contained in:
世界 2024-11-02 21:37:04 +08:00
parent 0e511791e8
commit b460484e43
No known key found for this signature in database
GPG key ID: CD109927C34A63C4

View file

@ -11,6 +11,11 @@ import (
) )
func New(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.Outbound) (adapter.Outbound, error) { func New(ctx context.Context, router adapter.Router, logger log.ContextLogger, tag string, options option.Outbound) (adapter.Outbound, error) {
if tag != "" {
ctx = adapter.WithContext(ctx, &adapter.InboundContext{
Outbound: tag,
})
}
if options.Type == "" { if options.Type == "" {
return nil, E.New("missing outbound type") return nil, E.New("missing outbound type")
} }