aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/golang.js
diff options
context:
space:
mode:
authorMatt Godbolt <matt@godbolt.org>2017-12-21 07:49:41 -0600
committerMatt Godbolt <matt@godbolt.org>2017-12-21 07:49:41 -0600
commit69ca21d67398282f93d2a19e45aa0d3dd0ff7e33 (patch)
tree48b24cd27e47c86813edeccba32b294183295385 /lib/compilers/golang.js
parentacca036eeb4f4da21ba8d6b1f7dc2d8af82409f8 (diff)
downloadcompiler-explorer-69ca21d67398282f93d2a19e45aa0d3dd0ff7e33.tar.gz
compiler-explorer-69ca21d67398282f93d2a19e45aa0d3dd0ff7e33.zip
Remove filter(_.identity) in favour of _.compact()
Diffstat (limited to 'lib/compilers/golang.js')
-rw-r--r--lib/compilers/golang.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/compilers/golang.js b/lib/compilers/golang.js
index 4afb4dfbf..18a299f17 100644
--- a/lib/compilers/golang.js
+++ b/lib/compilers/golang.js
@@ -34,7 +34,7 @@ function compilenewgol(info, env) {
let prevLine = null;
let file = null;
let fileCount = 0;
- return code.map(function (obj) {
+ return _.compact(code.map(function (obj) {
const line = obj.text;
const match = line.match(re);
if (match) {
@@ -51,7 +51,7 @@ function compilenewgol(info, env) {
return res + "\t" + match[4].toLowerCase() + match[5];
} else
return null;
- }).filter(_.identity).join("\n");
+ })).join("\n");
}
compiler.postProcess = function (result, outputFilename, filters) {