diff options
author | Matthew Halpern <matthalp@google.com> | 2019-02-15 06:59:54 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2019-02-15 06:59:54 +0800 |
commit | e26a119c9b83e816a8ce9b0afdd6f2c82e61062d (patch) | |
tree | 0697f52afc38ee9dea480b085d98e27a2a268fcb /console | |
parent | 2b75fa9d6142441c19b524890f9f3c87a0de4091 (diff) | |
download | go-tangerine-e26a119c9b83e816a8ce9b0afdd6f2c82e61062d.tar go-tangerine-e26a119c9b83e816a8ce9b0afdd6f2c82e61062d.tar.gz go-tangerine-e26a119c9b83e816a8ce9b0afdd6f2c82e61062d.tar.bz2 go-tangerine-e26a119c9b83e816a8ce9b0afdd6f2c82e61062d.tar.lz go-tangerine-e26a119c9b83e816a8ce9b0afdd6f2c82e61062d.tar.xz go-tangerine-e26a119c9b83e816a8ce9b0afdd6f2c82e61062d.tar.zst go-tangerine-e26a119c9b83e816a8ce9b0afdd6f2c82e61062d.zip |
console: prefer nil slices over zero-length slices (#19076)
Diffstat (limited to 'console')
-rw-r--r-- | console/console.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/console/console.go b/console/console.go index 222ac3b52..50196d7f4 100644 --- a/console/console.go +++ b/console/console.go @@ -236,7 +236,7 @@ func (c *Console) clearHistory() { // consoleOutput is an override for the console.log and console.error methods to // stream the output into the configured output stream instead of stdout. func (c *Console) consoleOutput(call otto.FunctionCall) otto.Value { - output := []string{} + var output []string for _, argument := range call.ArgumentList { output = append(output, fmt.Sprintf("%v", argument)) } |