Commit e26a119c authored by Matthew Halpern's avatar Matthew Halpern Committed by Péter Szilágyi

console: prefer nil slices over zero-length slices (#19076)

parent 2b75fa9d
...@@ -236,7 +236,7 @@ func (c *Console) clearHistory() { ...@@ -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))
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment