NewNestedContextReader provides a context reader which is a composite of ordered child readers the first reader with a key will be used
(readers []expr.ContextReader, writer expr.ContextWriter, ts time.Time)
| 221 | // NewNestedContextReader provides a context reader which is a composite of ordered child readers |
| 222 | // the first reader with a key will be used |
| 223 | func NewNestedContextReadWriter(readers []expr.ContextReader, writer expr.ContextWriter, ts time.Time) expr.ContextReadWriter { |
| 224 | if rw, ok := writer.(expr.ContextReader); ok { |
| 225 | readers = append(readers, rw) |
| 226 | } |
| 227 | return &NestedContextReader{readers, writer, ts} |
| 228 | } |
| 229 | |
| 230 | func (n *NestedContextReader) Get(key string) (value.Value, bool) { |
| 231 | for _, r := range n.readers { |
no outgoing calls