mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
console: prefer nil slices over zero-length slices
This commit is contained in:
parent
ba90a4aaa4
commit
182ba519b5
1 changed files with 1 additions and 1 deletions
|
|
@ -236,7 +236,7 @@ func (c *Console) clearHistory() {
|
||||||
// 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
|
||||||
// stream the output into the configured output stream instead of stdout.
|
// stream the output into the configured output stream instead of stdout.
|
||||||
func (c *Console) consoleOutput(call otto.FunctionCall) otto.Value {
|
func (c *Console) consoleOutput(call otto.FunctionCall) otto.Value {
|
||||||
output := []string{}
|
var output []string
|
||||||
for _, argument := range call.ArgumentList {
|
for _, argument := range call.ArgumentList {
|
||||||
output = append(output, fmt.Sprintf("%v", argument))
|
output = append(output, fmt.Sprintf("%v", argument))
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue