gulp.task('go:build', function() {
var build = child.spawnSync('go', ['build', 'main.go']);
if (build.stderr.length) {
var lines = build.stderr.toString()
.split('\n').filter(function(line) {
return line.length
});
for (var l in lines)
util.log(util.colors.red(
'Error (go build): ' + lines[l]
));
notifier.notify({
title: 'Error (go build)',
message: lines
});
}
return build;
});