MCPcopy Index your code
hub / github.com/foxcpp/maddy / RewriteBody

Method RewriteBody

internal/testutils/modifier.go:103–112  ·  view source on GitHub ↗
(ctx context.Context, h *textproto.Header, body buffer.Buffer)

Source from the content-addressed store, hash-verified

101}
102
103func (ms modifierState) RewriteBody(ctx context.Context, h *textproto.Header, body buffer.Buffer) error {
104 if ms.m.BodyErr != nil {
105 return ms.m.BodyErr
106 }
107
108 for field := ms.m.AddHdr.Fields(); field.Next(); {
109 h.Add(field.Key(), field.Value())
110 }
111 return nil
112}
113
114func (ms modifierState) Close() error {
115 ms.m.UnclosedStates--

Callers

nothing calls this directly

Calls 3

AddMethod · 0.80
FieldsMethod · 0.65
NextMethod · 0.45

Tested by

no test coverage detected