This commit is contained in:
parent
b5d5658cd5
commit
36e55281c7
|
@ -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)
|
||||||
|
|
|
@ -15,6 +15,8 @@ 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) {
|
||||||
|
|
Loading…
Reference in New Issue