ClientContextWrite writes formatted contexts using the Context
(ctx Context, contexts []*ClientContext)
| 32 | |
| 33 | // ClientContextWrite writes formatted contexts using the Context |
| 34 | func ClientContextWrite(ctx Context, contexts []*ClientContext) error { |
| 35 | render := func(format func(subContext SubContext) error) error { |
| 36 | for _, context := range contexts { |
| 37 | if err := format(&clientContextContext{c: context}); err != nil { |
| 38 | return err |
| 39 | } |
| 40 | } |
| 41 | return nil |
| 42 | } |
| 43 | return ctx.Write(newClientContextContext(), render) |
| 44 | } |
| 45 | |
| 46 | type clientContextContext struct { |
| 47 | HeaderContext |
nothing calls this directly
no test coverage detected
searching dependent graphs…