summaryrefslogtreecommitdiffstats
path: root/hugolib/integrationtest_builder.go
diff options
context:
space:
mode:
Diffstat (limited to 'hugolib/integrationtest_builder.go')
-rw-r--r--hugolib/integrationtest_builder.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/hugolib/integrationtest_builder.go b/hugolib/integrationtest_builder.go
index 642bac7ab..be11c18d6 100644
--- a/hugolib/integrationtest_builder.go
+++ b/hugolib/integrationtest_builder.go
@@ -183,6 +183,13 @@ type lockingBuffer struct {
bytes.Buffer
}
+func (b *lockingBuffer) ReadFrom(r io.Reader) (n int64, err error) {
+ b.Lock()
+ n, err = b.Buffer.ReadFrom(r)
+ b.Unlock()
+ return
+}
+
func (b *lockingBuffer) Write(p []byte) (n int, err error) {
b.Lock()
n, err = b.Buffer.Write(p)