From 86c927bb4b92ffcd7c5b3fab2b47600bb330ba29 Mon Sep 17 00:00:00 2001 From: Sagleft Date: Sat, 28 May 2022 20:34:25 +0300 Subject: [PATCH] Update ws.go --- ws.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ws.go b/ws.go index e472086..12c9872 100644 --- a/ws.go +++ b/ws.go @@ -1,7 +1,6 @@ package utopiago import ( - "encoding/json" "errors" "fmt" "log" @@ -96,18 +95,19 @@ type WsEventsCallback func(ws WsEvent) type WsErrorCallback func(err error) type WsSubscribeTask struct { + Port int Callback WsEventsCallback // required ErrCallback WsErrorCallback // required } -func newWsEvent(jsonRaw string) (WsEvent, error) { +/*func newWsEvent(jsonRaw string) (WsEvent, error) { event := WsEvent{} err := json.Unmarshal([]byte(jsonRaw), &event) if err != nil { return event, errors.New("failed to decode event json: " + err.Error()) } return event, nil -} +}*/ // WsSubscribe - connect to websocket & recive messages. // NOTE: it's blocking method