This commit is contained in:
Liang Ding 2014-09-05 13:22:25 +08:00
parent b5d5658cd5
commit 36e55281c7
2 changed files with 4 additions and 2 deletions

View File

@ -294,7 +294,7 @@ func GoGetHandler(w http.ResponseWriter, r *http.Request) {
break break
} else { } else {
channelRet["output"] = string(buf[:count]) channelRet["output"] = string(buf[:count])
channelRet["cmd"] = "run" channelRet["cmd"] = "go get"
if nil != outputWS[sid] { if nil != outputWS[sid] {
err := outputWS[sid].WriteJSON(&channelRet) err := outputWS[sid].WriteJSON(&channelRet)

View File

@ -15,7 +15,9 @@ outputWS.onmessage = function(e) {
if (0 !== data.output.length) { // 说明编译有错误输出 if (0 !== data.output.length) { // 说明编译有错误输出
return; return;
} }
} } else if ('go get' === data.cmd) {
$('#output').text($('#output').text() + data.output);
}
if ('build' === data.cmd) { if ('build' === data.cmd) {
if ('run' === data.nextCmd) { if ('run' === data.nextCmd) {