GetConfig returns the global or context sensitive config
(ctx context.Context)
| 678 | |
| 679 | // GetConfig returns the global or context sensitive config |
| 680 | func GetConfig(ctx context.Context) *Filter { |
| 681 | if ctx == nil { |
| 682 | return globalConfig |
| 683 | } |
| 684 | c := ctx.Value(configContextKey) |
| 685 | if c == nil { |
| 686 | return globalConfig |
| 687 | } |
| 688 | return c.(*Filter) |
| 689 | } |
| 690 | |
| 691 | // CopyConfig copies the global config (if any) from srcCtx into |
| 692 | // dstCtx returning the new context. |
no outgoing calls
searching dependent graphs…