使用iris+bootstrap報(bào)錯(cuò)
//?SetupWebsockets?prepares?the?websocket?server. func?(b?*Bootstrapper)?SetupWebsockets(endpoint?string,?onConnection?websocket.ConnectionFunc)?{ ???ws?:=?websocket.New(websocket.Config{}) ???ws.OnConnection(onConnection) ???b.Get(endpoint,?ws.Handler()) ???b.Any("/iris-ws.js",?func(ctx?iris.Context)?{ ??????ctx.Write(websocket.ClientSource) ???}) }
bootstrapper.go這個(gè)文件 71行 報(bào)錯(cuò) 找不到
websocket?ConnectionFunc?這個(gè)類型?我是初學(xué)者?希望老師解答一下?謝謝
2019-08-20
先把這個(gè)注釋掉 項(xiàng)目中并沒(méi)有用到這個(gè)樣