mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 01:13:45 +00:00
console: clearHistory() now returns an error
This commit is contained in:
parent
b1534d1d14
commit
c79f7a46e7
1 changed files with 2 additions and 3 deletions
|
|
@ -217,11 +217,10 @@ func (c *Console) init(preload []string) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Console) clearHistory() {
|
func (c *Console) clearHistory() (err error) {
|
||||||
c.history = nil
|
c.history = nil
|
||||||
c.prompter.ClearHistory()
|
c.prompter.ClearHistory()
|
||||||
os.Remove(c.histPath)
|
return os.Remove(c.histPath)
|
||||||
fmt.Fprintf(c.printer, "history cleared\n")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// consoleOutput is an override for the console.log and console.error methods to
|
// consoleOutput is an override for the console.log and console.error methods to
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue