From eae7c736c89028375f4e1167414c97a80283b02b Mon Sep 17 00:00:00 2001 From: Roger Peppe Date: Thu, 4 Oct 2018 18:11:05 +0100 Subject: [PATCH] testscript: make it compile under Go 1.10 Making it compile under earlier versions than 1.10 is a bit harder, so punt for now. --- testscript/exe.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/testscript/exe.go b/testscript/exe.go index 1e8f9a1b..554a4853 100644 --- a/testscript/exe.go +++ b/testscript/exe.go @@ -190,9 +190,14 @@ func (nopTestDeps) WriteProfileTo(name string, w io.Writer, debug int) error { func (nopTestDeps) ImportPath() string { return "" } - func (nopTestDeps) StartTestLog(w io.Writer) {} func (nopTestDeps) StopTestLog() error { return nil } + +// Note: WriteHeapProfile is needed for Go 1.10 but not Go 1.11. +func (nopTestDeps) WriteHeapProfile(io.Writer) error { + // Not needed for Go 1.10. + return nil +}