diff options
Diffstat (limited to 'src/helsinki.at/rhimportd/ctrlWebSocket.go')
-rw-r--r-- | src/helsinki.at/rhimportd/ctrlWebSocket.go | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/helsinki.at/rhimportd/ctrlWebSocket.go b/src/helsinki.at/rhimportd/ctrlWebSocket.go index 7ceb9c4..9549311 100644 --- a/src/helsinki.at/rhimportd/ctrlWebSocket.go +++ b/src/helsinki.at/rhimportd/ctrlWebSocket.go @@ -107,11 +107,11 @@ func sendWebSocketResponse(ws *websocket.Conn, rd interface{}) { } } -func sendWebSocketErrorResponse(ws *websocket.Conn, code int, err_str string) { +func sendWebSocketErrorResponse(ws *websocket.Conn, code int, errStr string) { rd := &webSocketResponseBaseData{} rd.ResponseCode = code rd.Type = "error" - rd.ErrorString = err_str + rd.ErrorString = errStr sendWebSocketResponse(ws, rd) } @@ -134,7 +134,7 @@ func sendWebSocketListResponse(ws *websocket.Conn, sessions map[string]string) { sendWebSocketResponse(ws, rd) } -func sendWebSocketProgressResponse(ws *websocket.Conn, id, refid string, step int, step_name string, progress float64) { +func sendWebSocketProgressResponse(ws *websocket.Conn, id, refid string, step int, stepName string, progress float64) { rd := &webSocketResponseProgressData{} rd.ResponseCode = http.StatusOK rd.Type = "progress" @@ -142,16 +142,16 @@ func sendWebSocketProgressResponse(ws *websocket.Conn, id, refid string, step in rd.Id = id rd.RefId = refid rd.Step = step - rd.StepName = step_name + rd.StepName = stepName rd.Progress = progress sendWebSocketResponse(ws, rd) } -func sendWebSocketDoneResponse(ws *websocket.Conn, code int, err_str, id, refid string, cart, cut uint) { +func sendWebSocketDoneResponse(ws *websocket.Conn, code int, errStr, id, refid string, cart, cut uint) { rd := &webSocketResponseDoneData{} rd.ResponseCode = code rd.Type = "done" - rd.ErrorString = err_str + rd.ErrorString = errStr rd.Id = id rd.RefId = refid rd.Cart = cart @@ -174,13 +174,13 @@ func newWebSocketSession() *webSocketSession { return session } -func webSocketProgress(step int, step_name string, progress float64, userdata interface{}) bool { +func webSocketProgress(step int, stepName string, progress float64, userdata interface{}) bool { if math.IsNaN(progress) { progress = 0.0 } c := userdata.(chan<- rhimport.ProgressData) select { - case c <- rhimport.ProgressData{step, step_name, progress}: + case c <- rhimport.ProgressData{step, stepName, progress}: default: } return true |