Showing Posts From
Go

Go工程化 - 依赖注入
wire 乍看起来比较违反直觉,导致很多同学不理解为什么要用或不清楚如何用(也包括曾经的我),本文来帮助大家理解 wire 的使用。## What [](#what "Direct link

- April 10, 2024
使用runtime.SetFinalizer优雅关闭后台goroutine
在 Go 语言中,使用 runtime.SetFinalizer 可以帮助我们优雅地关闭后台 goroutine,确保资源得到正确释放。本文将介绍 runtime.SetFinalizer 的用法以

- December 5, 2023
Server-Sent-Events在Go中的应用
Server Sent Events (SSE) 是一种允许服务器向客户端推送事件的技术。与 WebSocket 不同,SSE 是单向的,只允许服务器向客户端发送数据。在 Go 中,我们可以使用 g