equal
deleted
inserted
replaced
58 } |
58 } |
59 return nil |
59 return nil |
60 } |
60 } |
61 |
61 |
62 // Writer returns a new writer that implements Write(b) |
62 // Writer returns a new writer that implements Write(b) |
63 // by writing f(b) to w. The returned writer may use an |
63 // by writing f(b) to w. The returned writer may use an |
64 // an internal buffer to maintain state across Write calls. |
64 // internal buffer to maintain state across Write calls. |
65 // Calling its Close method writes any buffered data to w. |
65 // Calling its Close method writes any buffered data to w. |
66 func (f Form) Writer(w io.Writer) io.WriteCloser { |
66 func (f Form) Writer(w io.Writer) io.WriteCloser { |
67 wr := &normWriter{rb: reorderBuffer{}, w: w} |
67 wr := &normWriter{rb: reorderBuffer{}, w: w} |
68 wr.rb.init(f, nil) |
68 wr.rb.init(f, nil) |
69 return wr |
69 return wr |