<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Context on Gheyret</title><link>https://gheyret.com/tags/context/</link><description>Recent content in Context on Gheyret</description><generator>Hugo</generator><language>zh-cn</language><lastBuildDate>Tue, 06 Oct 2026 00:00:00 +0800</lastBuildDate><atom:link href="https://gheyret.com/tags/context/index.xml" rel="self" type="application/rss+xml"/><item><title>Go context 实战：从优雅退出到数据库连接超时</title><link>https://gheyret.com/posts/go-context-and-graceful-shutdown/</link><pubDate>Tue, 06 Oct 2026 00:00:00 +0800</pubDate><guid>https://gheyret.com/posts/go-context-and-graceful-shutdown/</guid><description>以本项目 server 的启动流程为线索，把 context.Context 讲透：它到底是什么、为什么这样设计、NotifyContext 如何实现优雅退出、WithTimeout 如何给数据库建连加超时，以及 Open/Connect、Ping/PingContext 的区别与常见坑，附完整时序图与速查表。</description></item></channel></rss>