Type assertion für func fehlte

master
Klaus Wendel 8 months ago
parent 46ea1a9219
commit 34148e4aa7

@ -100,7 +100,7 @@ func (r *GosmContainer) WsContainerSend(method WsCommunicationMethod, conn *webs
func (r *GosmContainer) WsContainerReceive(method WsCommunicationMethod, conn *websocket.Conn, ctx context.Context, dosth func(interface{}) interface{}) (err error, receiveval, sendval interface{}, mtr websocket.MessageType) {
switch {
case method == ReceiveTextMethod || method == ReceiveBinaryMethod:
err, receiveval, sendval, mtr = WsReceive(ctx, conn, dosth)
err, receiveval, sendval, mtr = WsReceive(ctx, conn, dosth.(func([]byte) []byte))
case method == ReceiveJsonMethod:
err, receiveval, sendval = WsjsonReceive(ctx, conn, dosth)
mtr = websocket.MessageText

Loading…
Cancel
Save