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,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) {
|
||||||
|
|
Loading…
Reference in New Issue