As pointed out by the linter, some exported functions and types are
missing doc comments.
The linter warnings have been reduced from 194 to 116.
Not all missing comments have been added in this commit though.
If hugo server is run on port 80 or 443, LiveReload does not
correctly bind to the same port, instead using port 35729.
This commit adds functionality to inform LiveReload of the
correct port to bind to.
See https://github.com/livereload/livereload-js/issues/16
Partially contributed by Jeff Minard (@chuyskywalker).
Fixes#2205
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%