const { spawn } = require('child_process');
function run_cmd(cmd, args, callBack) {
const child = spawn(cmd, args);
let resp = "";
child.stdout.on('data', function (buffer) { resp += buffer.toString() });
child.stdout.on('end', function() { callBack (resp) });
child.stdout.on('error', callBack);
};
run_cmd("./go.js", ["-l"], function(err, text) {
if (err) return console.error(err);
console.log(text)
});