yanc0 / goyaniv Goto Github PK
View Code? Open in Web Editor NEWOnline, multiplayer, yaniv card game
Online, multiplayer, yaniv card game
&{put [22] 0 Yann}
&{put [34] 0 Brou}
&{put [4] 0 Yann}
&{put [6] 4 Brou}
&{put [47] 6 Yann}
&{yaniv [] 0 Brou}
Player ID dcGfVdCpvgsYTGjJNSLT cannot asaf
no
yes
&{put [24] 7 Brou}
&{put [24] 7 Brou}
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xb code=0x1 addr=0x8 pc=0x430731]
goroutine 160 [running]:
runtime.panic(0x79d100, 0xa0b573)
/usr/src/go/src/pkg/runtime/panic.c:279 +0xf5
github.com/yanc0/goyaniv/goyaniv.Deck.IsMultiple(0xc2080d04d0, 0x2, 0x2, 0x1)
/go/src/github.com/yanc0/goyaniv/goyaniv/deck.go:96 +0x41
github.com/yanc0/goyaniv/goyaniv.ActionPut(0xc20800e900, 0xc20800e300, 0xc208018550, 0x0, 0x0)
/go/src/github.com/yanc0/goyaniv/goyaniv/action.go:141 +0xfd7
github.com/yanc0/goyaniv/goyaniv.FireMessage(0xc208023ec0, 0xc20810e440, 0xc20813ac00, 0x2b, 0x600, 0x413105)
/go/src/github.com/yanc0/goyaniv/goyaniv/action.go:249 +0x732
github.com/yanc0/goyaniv/goyaniv.func·005(0xc20810e440, 0xc20813ac00, 0x2b, 0x600)
/go/src/github.com/yanc0/goyaniv/goyaniv/server.go:87 +0x51
created by github.com/olahol/melody.(*Session).readPump
/go/src/github.com/olahol/melody/session.go:100 +0x212
goroutine 16 [IO wait]:
net.runtime_pollWait(0x7f12c058a748, 0x72, 0x0)
/usr/src/go/src/pkg/runtime/netpoll.goc:146 +0x66
net.(_pollDesc).Wait(0xc2080d7e90, 0x72, 0x0, 0x0)
/usr/src/go/src/pkg/net/fd_poll_runtime.go:84 +0x46
net.(_pollDesc).WaitRead(0xc2080d7e90, 0x0, 0x0)
/usr/src/go/src/pkg/net/fd_poll_runtime.go:89 +0x42
net.(_netFD).accept(0xc2080d7e30, 0x8b5d38, 0x0, 0x7f12c05893f0, 0xb)
/usr/src/go/src/pkg/net/fd_unix.go:419 +0x343
net.(_TCPListener).AcceptTCP(0xc20803a180, 0x49d053, 0x0, 0x0)
/usr/src/go/src/pkg/net/tcpsock_posix.go:234 +0x5d
net/http.tcpKeepAliveListener.Accept(0xc20803a180, 0x0, 0x0, 0x0, 0x0)
/usr/src/go/src/pkg/net/http/server.go:1947 +0x4b
net/http.(_Server).Serve(0xc2080050e0, 0x7f12c058a7f8, 0xc20803a180, 0x0, 0x0)
/usr/src/go/src/pkg/net/http/server.go:1698 +0x91
net/http.(_Server).ListenAndServe(0xc2080050e0, 0x0, 0x0)
/usr/src/go/src/pkg/net/http/server.go:1688 +0x14d
net/http.ListenAndServe(0x7e1a70, 0x5, 0x7f12c0589720, 0xc208070620, 0x0, 0x0)
/usr/src/go/src/pkg/net/http/server.go:1778 +0x79
github.com/gin-gonic/gin.(_Engine).Run(0xc208070620, 0x7e1a70, 0x5, 0x0, 0x0)
/go/src/github.com/gin-gonic/gin/gin.go:234 +0x19f
github.com/yanc0/goyaniv/goyaniv.(_Server).Run(0xc208023ec0)
/go/src/github.com/yanc0/goyaniv/goyaniv/server.go:101 +0x4a
main.main()
/go/src/app/main.go:9 +0x2b
goroutine 19 [finalizer wait, 164 minutes]:
runtime.park(0x412e40, 0xa126b0, 0xa10109)
/usr/src/go/src/pkg/runtime/proc.c:1369 +0x89
runtime.parkunlock(0xa126b0, 0xa10109)
/usr/src/go/src/pkg/runtime/proc.c:1385 +0x3b
runfinq()
/usr/src/go/src/pkg/runtime/mgc0.c:2644 +0xcf
runtime.goexit()
/usr/src/go/src/pkg/runtime/proc.c:1445
goroutine 20 [select]:
github.com/olahol/melody.(*hub).run(0xc208082580)
/go/src/github.com/olahol/melody/hub.go:21 +0x2b9
created by github.com/olahol/melody.New
/go/src/github.com/olahol/melody/melody.go:33 +0x111
goroutine 120 [IO wait]:
net.runtime_pollWait(0x7f12c058a5e8, 0x72, 0x0)
/usr/src/go/src/pkg/runtime/netpoll.goc:146 +0x66
net.(_pollDesc).Wait(0xc208112140, 0x72, 0x0, 0x0)
/usr/src/go/src/pkg/net/fd_poll_runtime.go:84 +0x46
net.(_pollDesc).WaitRead(0xc208112140, 0x0, 0x0)
/usr/src/go/src/pkg/net/fd_poll_runtime.go:89 +0x42
net.(_netFD).Read(0xc2081120e0, 0xc208044c00, 0x400, 0x400, 0x0, 0x7f12c05893f0, 0xb)
/usr/src/go/src/pkg/net/fd_unix.go:242 +0x34c
net.(_conn).Read(0xc20803a028, 0xc208044c00, 0x400, 0x400, 0x0, 0x0, 0x0)
/usr/src/go/src/pkg/net/net.go:122 +0xe7
bufio.(_Reader).fill(0xc2080042a0)
/usr/src/go/src/pkg/bufio/bufio.go:97 +0x1b3
bufio.(_Reader).Read(0xc2080042a0, 0xc2080d03d0, 0x2, 0x8, 0x2, 0x0, 0x0)
/usr/src/go/src/pkg/bufio/bufio.go:175 +0x230
github.com/gorilla/websocket.(_Conn).readFull(0xc2080502d0, 0xc2080d03d0, 0x2, 0x8, 0x0, 0x0)
/go/src/github.com/gorilla/websocket/conn.go:542 +0xb0
github.com/gorilla/websocket.(_Conn).advanceFrame(0xc2080502d0, 0x165, 0x0, 0x0)
/go/src/github.com/gorilla/websocket/conn.go:566 +0x162
github.com/gorilla/websocket.(_Conn).NextReader(0xc2080502d0, 0xc2080d1110, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/gorilla/websocket/conn.go:706 +0x77
github.com/gorilla/websocket.(_Conn).ReadMessage(0xc2080502d0, 0xc20813ac00, 0x0, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/gorilla/websocket/conn.go:769 +0x6e
github.com/olahol/melody.(_Session).readPump(0xc20810e440, 0xc2080d1110, 0x8b5658, 0x8b5660)
/go/src/github.com/olahol/melody/session.go:92 +0x169
github.com/olahol/melody.(_Melody).HandleRequest(0xc20806d6c0, 0x7f12c058aa38, 0xc2080846e0, 0xc208027040)
/go/src/github.com/olahol/melody/melody.go:89 +0x1ce
github.com/yanc0/goyaniv/goyaniv.func·004(0xc2080846e0)
/go/src/github.com/yanc0/goyaniv/goyaniv/server.go:83 +0x80
github.com/gin-gonic/gin.(_Context).Next(0xc2080846e0)
/go/src/github.com/gin-gonic/gin/context.go:95 +0x81
github.com/gin-gonic/gin.func·007(0xc2080846e0)
/go/src/github.com/gin-gonic/gin/logger.go:56 +0x93
github.com/gin-gonic/gin.(_Context).Next(0xc2080846e0)
/go/src/github.com/gin-gonic/gin/context.go:95 +0x81
github.com/gin-gonic/gin.func·009(0xc2080846e0)
/go/src/github.com/gin-gonic/gin/recovery.go:43 +0x6f
github.com/gin-gonic/gin.(_Context).Next(0xc2080846e0)
/go/src/github.com/gin-gonic/gin/context.go:95 +0x81
github.com/gin-gonic/gin.(_Engine).handleHTTPRequest(0xc208070620, 0xc2080846e0)
/go/src/github.com/gin-gonic/gin/gin.go:292 +0x265
github.com/gin-gonic/gin.(_Engine).ServeHTTP(0xc208070620, 0x7f12c058a988, 0xc2080ca0a0, 0xc208027040)
/go/src/github.com/gin-gonic/gin/gin.go:273 +0xce
net/http.serverHandler.ServeHTTP(0xc2080050e0, 0x7f12c058a988, 0xc2080ca0a0, 0xc208027040)
/usr/src/go/src/pkg/net/http/server.go:1673 +0x19f
net/http.(_conn).serve(0xc20800e200)
/usr/src/go/src/pkg/net/http/server.go:1174 +0xa7e
created by net/http.(*Server).Serve
/usr/src/go/src/pkg/net/http/server.go:1721 +0x313
goroutine 141 [IO wait]:
net.runtime_pollWait(0x7f12c058a698, 0x72, 0x0)
/usr/src/go/src/pkg/runtime/netpoll.goc:146 +0x66
net.(_pollDesc).Wait(0xc208112760, 0x72, 0x0, 0x0)
/usr/src/go/src/pkg/net/fd_poll_runtime.go:84 +0x46
net.(_pollDesc).WaitRead(0xc208112760, 0x0, 0x0)
/usr/src/go/src/pkg/net/fd_poll_runtime.go:89 +0x42
net.(_netFD).Read(0xc208112700, 0xc208045000, 0x400, 0x400, 0x0, 0x7f12c05893f0, 0xb)
/usr/src/go/src/pkg/net/fd_unix.go:242 +0x34c
net.(_conn).Read(0xc20803a2d8, 0xc208045000, 0x400, 0x400, 0x0, 0x0, 0x0)
/usr/src/go/src/pkg/net/net.go:122 +0xe7
bufio.(_Reader).fill(0xc208004360)
/usr/src/go/src/pkg/bufio/bufio.go:97 +0x1b3
bufio.(_Reader).Read(0xc208004360, 0xc2080684e0, 0x2, 0x8, 0x2, 0x0, 0x0)
/usr/src/go/src/pkg/bufio/bufio.go:175 +0x230
github.com/gorilla/websocket.(_Conn).readFull(0xc208050000, 0xc2080684e0, 0x2, 0x8, 0x0, 0x0)
/go/src/github.com/gorilla/websocket/conn.go:542 +0xb0
github.com/gorilla/websocket.(_Conn).advanceFrame(0xc208050000, 0xa, 0x0, 0x0)
/go/src/github.com/gorilla/websocket/conn.go:566 +0x162
github.com/gorilla/websocket.(_Conn).NextReader(0xc208050000, 0xc2080d1110, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/gorilla/websocket/conn.go:706 +0x77
github.com/gorilla/websocket.(_Conn).ReadMessage(0xc208050000, 0xc208146600, 0x0, 0x0, 0x0, 0x0, 0x0)
/go/src/github.com/gorilla/websocket/conn.go:769 +0x6e
github.com/olahol/melody.(_Session).readPump(0xc20810fde0, 0xc2080d1110, 0x8b5658, 0x8b5660)
/go/src/github.com/olahol/melody/session.go:92 +0x169
github.com/olahol/melody.(_Melody).HandleRequest(0xc20806d6c0, 0x7f12c058aa38, 0xc2080858c0, 0xc208026270)
/go/src/github.com/olahol/melody/melody.go:89 +0x1ce
github.com/yanc0/goyaniv/goyaniv.func·004(0xc2080858c0)
/go/src/github.com/yanc0/goyaniv/goyaniv/server.go:83 +0x80
github.com/gin-gonic/gin.(_Context).Next(0xc2080858c0)
/go/src/github.com/gin-gonic/gin/context.go:95 +0x81
github.com/gin-gonic/gin.func·007(0xc2080858c0)
/go/src/github.com/gin-gonic/gin/logger.go:56 +0x93
github.com/gin-gonic/gin.(_Context).Next(0xc2080858c0)
/go/src/github.com/gin-gonic/gin/context.go:95 +0x81
github.com/gin-gonic/gin.func·009(0xc2080858c0)
/go/src/github.com/gin-gonic/gin/recovery.go:43 +0x6f
github.com/gin-gonic/gin.(_Context).Next(0xc2080858c0)
/go/src/github.com/gin-gonic/gin/context.go:95 +0x81
github.com/gin-gonic/gin.(_Engine).handleHTTPRequest(0xc208070620, 0xc2080858c0)
/go/src/github.com/gin-gonic/gin/gin.go:292 +0x265
github.com/gin-gonic/gin.(_Engine).ServeHTTP(0xc208070620, 0x7f12c058a988, 0xc2080cb540, 0xc208026270)
/go/src/github.com/gin-gonic/gin/gin.go:273 +0xce
net/http.serverHandler.ServeHTTP(0xc2080050e0, 0x7f12c058a988, 0xc2080cb540, 0xc208026270)
/usr/src/go/src/pkg/net/http/server.go:1673 +0x19f
net/http.(_conn).serve(0xc20800e180)
/usr/src/go/src/pkg/net/http/server.go:1174 +0xa7e
created by net/http.(*Server).Serve
/usr/src/go/src/pkg/net/http/server.go:1721 +0x313
goroutine 143 [select]:
github.com/olahol/melody.(_Session).writePump(0xc20810fde0, 0x8b5660)
/go/src/github.com/olahol/melody/session.go:64 +0x1a2
created by github.com/olahol/melody.(_Melody).HandleRequest
/go/src/github.com/olahol/melody/melody.go:87 +0x19b
goroutine 122 [select]:
github.com/olahol/melody.(_Session).writePump(0xc20810e440, 0x8b5660)
/go/src/github.com/olahol/melody/session.go:64 +0x1a2
created by github.com/olahol/melody.(_Melody).HandleRequest
/go/src/github.com/olahol/melody/melody.go:87 +0x19b
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.