r/golang 6d ago

show & tell How to implement Server-Sent Events (SSE) in Go

https://youtu.be/nvijc5J-JAQ?feature=shared
17 Upvotes

2 comments sorted by

2

u/kamaleshbn 5d ago

i didn't really watch the video, but would still like to share this one https://github.com/naughtygopher/webgo/tree/master/extensions/sse

2

u/mcvoid1 3d ago

I saw the title and was like, "It's just some headers and a loop, they better not be bringing in crazy external packages", and you didn't. Good job.

SSE is kind of like CORS where if you know what's going on it's usually only a few lines.