From 36e55281c7b7095cea0b5f676e703c4b25da7e98 Mon Sep 17 00:00:00 2001 From: Liang Ding Date: Fri, 5 Sep 2014 13:22:25 +0800 Subject: [PATCH] . --- output/outputs.go | 2 +- static/js/wide.js | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/output/outputs.go b/output/outputs.go index cf2bba2..4cdb22c 100644 --- a/output/outputs.go +++ b/output/outputs.go @@ -294,7 +294,7 @@ func GoGetHandler(w http.ResponseWriter, r *http.Request) { break } else { channelRet["output"] = string(buf[:count]) - channelRet["cmd"] = "run" + channelRet["cmd"] = "go get" if nil != outputWS[sid] { err := outputWS[sid].WriteJSON(&channelRet) diff --git a/static/js/wide.js b/static/js/wide.js index 8b62c62..ad27e5e 100644 --- a/static/js/wide.js +++ b/static/js/wide.js @@ -15,7 +15,9 @@ outputWS.onmessage = function(e) { if (0 !== data.output.length) { // 说明编译有错误输出 return; } - } + } else if ('go get' === data.cmd) { + $('#output').text($('#output').text() + data.output); + } if ('build' === data.cmd) { if ('run' === data.nextCmd) {