hugo/transform
bep 98ee69bce2 Write to rotating ContentReWriter in transformer chain
This commit adds the interface ContentReWriter in the tranformer chain.

This is backed by two pooled byte buffers, alternating between being the reader or the writer.

This keeps the performance characteristic of the old implementation, but in a thread safe way.

Fixes #911

Benchmark old vs new:

benchmark              old ns/op     new ns/op     delta
BenchmarkAbsURL        17614         17384         -1.31%
BenchmarkXMLAbsURL     9431          9248          -1.94%

benchmark              old allocs     new allocs     delta
BenchmarkAbsURL        24             28             +16.67%
BenchmarkXMLAbsURL     12             14             +16.67%

benchmark              old bytes     new bytes     delta
BenchmarkAbsURL        3295          3424          +3.92%
BenchmarkXMLAbsURL     1954          1987          +1.69%
2015-03-18 17:05:54 +01:00
..
absurl.go Write to rotating ContentReWriter in transformer chain 2015-03-18 17:05:54 +01:00
absurlreplacer.go Write to rotating ContentReWriter in transformer chain 2015-03-18 17:05:54 +01:00
chain.go Write to rotating ContentReWriter in transformer chain 2015-03-18 17:05:54 +01:00
chain_test.go Write to rotating ContentReWriter in transformer chain 2015-03-18 17:05:54 +01:00
livereloadinject.go Write to rotating ContentReWriter in transformer chain 2015-03-18 17:05:54 +01:00