<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/assets/atom.xsl"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <id>https://weizicoding.top/</id>
  <title>约定的小镇</title>
  <updated>2026-06-18T18:37:54.897+08:00[Asia/Singapore]</updated>
  <description>约定的小镇的个人博客，分享技术与生活。技术主要围绕使用 Go 语言构建高性能的 RPG、MMO 和 SLG 游戏后端，同时这个博客还记录了他在生活和学习中的点滴经历，充满启发与思考。网站界面简洁美观，内容丰富实用，人气互动活跃，涵盖了编程、生活、学习等多个领域，为读者提供了卓越的阅读体验。</description>
  <author>
    <name>约定的小镇</name>
    <email>gongguowei01@gmail.com</email>
    <uri>https://weizicoding.top/</uri>
  </author>
  <link href="https://weizicoding.top/atom.xml" rel="self"></link>
  <link href="https://weizicoding.top/" rel="alternate"></link>
  <language>zh-CN</language>
  <generator uri="https://github.com/L33Z22L11/blog-v3" version="3.7.0-rc.1">Clarity</generator>
  <icon>https://weizicoding.top/api/icon.png</icon>
  <logo>https://u.fukit.cn/avNLyilhF</logo>
  <rights>© 2026 约定的小镇</rights>
  <subtitle>写代码是热爱，写到世界充满爱</subtitle>
  <entry>
    <id>https://weizicoding.top/2019/missed_a_lifetime</id>
    <title>以为错过的是一个人，其实错过的是整个人生</title>
    <updated>2023-11-30T10:34:07Z</updated>
    <author>
      <name>约定的小镇</name>
    </author>
    <content type="html">
      <![CDATA[<img src="https://img2.tofaka.com/autoupload/Z3wg1auvHGH_fxQcOFgj2SfNcKcqEnRmcljopnyJoMs/20260616/EQKo/1280X1265/50fce62650c581f3bb5c9eb520fc21b.jpg/webp" alt="以为错过的是一个人，其实错过的是整个人生" /> <p>突然梦见自己站在阳光普照的高中操场看见那个以前的她，还是笑得那么灿烂。</p> <a class="view-full" href="https://weizicoding.top/2019/missed_a_lifetime" target="_blank">点击查看全文</a>]]>
    </content>
    <link href="https://weizicoding.top/2019/missed_a_lifetime"></link>
    <summary>突然梦见自己站在阳光普照的高中操场看见那个以前的她，还是笑得那么灿烂。</summary>
    <category term="生活"></category>
    <published>2019-07-23T10:34:07Z</published>
  </entry>
  <entry>
    <id>https://weizicoding.top/2020/hashfun_first_month_reflection</id>
    <title>做猪呢，最重要的是开心</title>
    <author>
      <name>约定的小镇</name>
    </author>
    <content type="html">
      <![CDATA[  <a class="view-full" href="https://weizicoding.top/2020/hashfun_first_month_reflection" target="_blank">点击查看全文</a>]]>
    </content>
    <link href="https://weizicoding.top/2020/hashfun_first_month_reflection"></link>
    <summary></summary>
    <category term="生活"></category>
    <published>2020-04-01T11:53:37Z</published>
  </entry>
  <entry>
    <id>https://weizicoding.top/2021/ffmpeg_marquee_ads_processing</id>
    <title>移除跑马灯广告</title>
    <author>
      <name>约定的小镇</name>
    </author>
    <content type="html">
      <![CDATA[ <p>通过 FFmpeg 批量修剪多个视频的指定位置。</p> <a class="view-full" href="https://weizicoding.top/2021/ffmpeg_marquee_ads_processing" target="_blank">点击查看全文</a>]]>
    </content>
    <link href="https://weizicoding.top/2021/ffmpeg_marquee_ads_processing"></link>
    <summary>通过 FFmpeg 批量修剪多个视频的指定位置。</summary>
    <category term="技术"></category>
    <published>2021-02-23T11:53:37Z</published>
  </entry>
  <entry>
    <id>https://weizicoding.top/2022/struct_perf_boost_15_percent</id>
    <title>0 秒改 struct 性能直接提升 15%，产品姐姐都夸我好棒</title>
    <author>
      <name>约定的小镇</name>
    </author>
    <content type="html">
      <![CDATA[ <p>简单地重新排序结构体中的字段，提高了 Go 程序的速度和内存使用率。</p> <a class="view-full" href="https://weizicoding.top/2022/struct_perf_boost_15_percent" target="_blank">点击查看全文</a>]]>
    </content>
    <link href="https://weizicoding.top/2022/struct_perf_boost_15_percent"></link>
    <summary>简单地重新排序结构体中的字段，提高了 Go 程序的速度和内存使用率。</summary>
    <category term="技术"></category>
    <published>2022-08-18T11:53:37Z</published>
  </entry>
  <entry>
    <id>https://weizicoding.top/2022/weight-random</id>
    <title>为什么抽不到 SSR，原来是这段代码在作祟</title>
    <author>
      <name>约定的小镇</name>
    </author>
    <content type="html">
      <![CDATA[<img src="https://img2.tofaka.com/autoupload/Z3wg1auvHGH_fxQcOFgj2SfNcKcqEnRmcljopnyJoMs/20260616/yyJZ/1373X582/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20260616163159.png/webp" alt="为什么抽不到 SSR，原来是这段代码在作祟" /> <p>“偏心”的得到某种随机结果。</p> <a class="view-full" href="https://weizicoding.top/2022/weight-random" target="_blank">点击查看全文</a>]]>
    </content>
    <link href="https://weizicoding.top/2022/weight-random"></link>
    <summary>“偏心”的得到某种随机结果。</summary>
    <category term="技术"></category>
    <published>2022-02-16T10:34:07Z</published>
  </entry>
  <entry>
    <id>https://weizicoding.top/2023/multiplayer_frame_sync_strategies</id>
    <title>游戏帧同步</title>
    <author>
      <name>约定的小镇</name>
    </author>
    <content type="html">
      <![CDATA[<img src="https://img2.tofaka.com/autoupload/Z3wg1auvHGH_fxQcOFgj2SfNcKcqEnRmcljopnyJoMs/20260616/hMiP/3840X2160/wallhaven-ly229p.png/webp" alt="游戏帧同步" /> <p>介绍该问题的基本概念和常见解决方案，我并没有做过帧同步的工作，分享的知识都是我对它感兴趣，在网上看了许多经验后整理的。</p> <a class="view-full" href="https://weizicoding.top/2023/multiplayer_frame_sync_strategies" target="_blank">点击查看全文</a>]]>
    </content>
    <link href="https://weizicoding.top/2023/multiplayer_frame_sync_strategies"></link>
    <summary>介绍该问题的基本概念和常见解决方案，我并没有做过帧同步的工作，分享的知识都是我对它感兴趣，在网上看了许多经验后整理的。</summary>
    <category term="技术"></category>
    <published>2023-09-11T10:34:07Z</published>
  </entry>
  <entry>
    <id>https://weizicoding.top/2024/redis_master_slave</id>
    <title>搭建 Redis 主从模式</title>
    <author>
      <name>约定的小镇</name>
    </author>
    <content type="html">
      <![CDATA[ <p>主从模式可以避免机器故障引发的数据丢失。</p> <a class="view-full" href="https://weizicoding.top/2024/redis_master_slave" target="_blank">点击查看全文</a>]]>
    </content>
    <link href="https://weizicoding.top/2024/redis_master_slave"></link>
    <summary>主从模式可以避免机器故障引发的数据丢失。</summary>
    <category term="技术"></category>
    <published>2024-11-23T11:53:37Z</published>
  </entry>
  <entry>
    <id>https://weizicoding.top/2025/code-complete-2-notes</id>
    <title>读薄《代码大全2》</title>
    <author>
      <name>约定的小镇</name>
    </author>
    <content type="html">
      <![CDATA[<img src="https://img2.tofaka.com/autoupload/Z3wg1auvHGH_fxQcOFgj2SfNcKcqEnRmcljopnyJoMs/20260618/qsBG/2560X1440/andreas-gucklhorn-mawU2PoJWfU-unsplash.jpg/webp" alt="读薄《代码大全2》" /> <p>点出书本中的重点概念，并用 Go 语言代码进行示例说明。</p> <a class="view-full" href="https://weizicoding.top/2025/code-complete-2-notes" target="_blank">点击查看全文</a>]]>
    </content>
    <link href="https://weizicoding.top/2025/code-complete-2-notes"></link>
    <summary>点出书本中的重点概念，并用 Go 语言代码进行示例说明。</summary>
    <category term="技术"></category>
    <published>2025-08-05T11:53:37Z</published>
  </entry>
  <entry>
    <id>https://weizicoding.top/2026/solve-waitgroup-panic</id>
    <title>修复 WaitGroup 送出的 Panic 大礼包</title>
    <author>
      <name>约定的小镇</name>
    </author>
    <content type="html">
      <![CDATA[<img src="https://img2.tofaka.com/autoupload/Z3wg1auvHGH_fxQcOFgj2SfNcKcqEnRmcljopnyJoMs/20260618/yuof/1001X623/%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_17817742138899.png/webp" alt="修复 WaitGroup 送出的 Panic 大礼包" /> <p>Node A 的玩家数据残留在 Redis，而 Node B 以相同 ID 顶替上线，跨进程的 sync.WaitGroup 计数污染就此上演。</p> <a class="view-full" href="https://weizicoding.top/2026/solve-waitgroup-panic" target="_blank">点击查看全文</a>]]>
    </content>
    <link href="https://weizicoding.top/2026/solve-waitgroup-panic"></link>
    <summary>Node A 的玩家数据残留在 Redis，而 Node B 以相同 ID 顶替上线，跨进程的 sync.WaitGroup 计数污染就此上演。</summary>
    <category term="技术"></category>
    <published>2026-03-30T07:59:07Z</published>
  </entry>
</feed>
