aboutsummaryrefslogtreecommitdiff
path: root/lib/compilers/golang.js
diff options
context:
space:
mode:
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 423030500..73a64aac7 100644
--- a/lib/compilers/golang.js
+++ b/lib/compilers/golang.js
@@ -169,7 +169,7 @@ export class GolangCompiler extends BaseCompiler {
extractLogging(stdout) {
let filepath = `./${this.compileFilename}`;
- const reLogging = new RegExp(`^${filepath}:([0-9]*):([0-9]*):\\s(.*)`, 'i');
+ const reLogging = /^[^:]+:\d+:(\d+:)?\s.*/;
return stdout.filter(obj => obj.text.match(reLogging))
.map(obj => obj.text.replace(filepath, '<source>'))
.join('\n');
@@ -201,7 +201,7 @@ export class GolangCompiler extends BaseCompiler {
return ['build', '-o', outputFilename, '-gcflags=' + userOptions.join(' ')];
} else {
// Add userOptions to -gcflags to preserve previous behavior.
- return ['build', '-o', outputFilename, '-gcflags', '-S ' + userOptions.join(' ')];
+ return ['build', '-o', outputFilename, '-gcflags=-S ' + userOptions.join(' ')];
}
}