From c79f7a46e74f35e129cfbb3837fd09650b71d830 Mon Sep 17 00:00:00 2001 From: Sorin Neacsu Date: Thu, 7 Dec 2017 10:56:16 -0800 Subject: [PATCH] console: clearHistory() now returns an error --- console/console.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/console/console.go b/console/console.go index aa9562cfc6..a7fa287d11 100644 --- a/console/console.go +++ b/console/console.go @@ -217,11 +217,10 @@ func (c *Console) init(preload []string) error { return nil } -func (c *Console) clearHistory() { +func (c *Console) clearHistory() (err error) { c.history = nil c.prompter.ClearHistory() - os.Remove(c.histPath) - fmt.Fprintf(c.printer, "history cleared\n") + return os.Remove(c.histPath) } // consoleOutput is an override for the console.log and console.error methods to