{"id":34156337,"url":"https://github.com/jianghushinian/blog-go-example","last_synced_at":"2026-03-11T02:02:53.079Z","repository":{"id":169404958,"uuid":"634049605","full_name":"jianghushinian/blog-go-example","owner":"jianghushinian","description":"个人博客中 Go 相关的示例代码","archived":false,"fork":false,"pushed_at":"2026-02-17T05:47:14.000Z","size":10486,"stargazers_count":49,"open_issues_count":0,"forks_count":6,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-17T11:24:17.018Z","etag":null,"topics":["go","golang"],"latest_commit_sha":null,"homepage":"https://jianghushinian.cn/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jianghushinian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-04-28T22:49:41.000Z","updated_at":"2026-02-17T05:47:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"8788e2be-8867-4429-8d66-911fdfa5c9e1","html_url":"https://github.com/jianghushinian/blog-go-example","commit_stats":null,"previous_names":["jianghushinian/blog-go-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jianghushinian/blog-go-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jianghushinian%2Fblog-go-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jianghushinian%2Fblog-go-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jianghushinian%2Fblog-go-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jianghushinian%2Fblog-go-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jianghushinian","download_url":"https://codeload.github.com/jianghushinian/blog-go-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jianghushinian%2Fblog-go-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30367800,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T21:41:54.280Z","status":"online","status_checked_at":"2026-03-11T02:00:07.027Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang"],"created_at":"2025-12-15T07:04:48.859Z","updated_at":"2026-03-11T02:02:53.070Z","avatar_url":"https://github.com/jianghushinian.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# blog-go-example\n\n个人博客中 Go 相关的示例代码\n\n关注我的公众号：「Go 编程世界」，防止迷路，第一时间接收文章更新通知。\n\n\u003cimg alt=\"Go编程世界\" src=\"./assets/imgs/mpweixin.png\" width=\"270px\"\u003e\n\n加我微信，备注「加群」，拉你进 Go 语言学习交流群。\n\n\u003cimg alt=\"Go编程世界\" src=\"./assets/imgs/weixin.jpg\" width=\"270px\"\u003e\n\n- [mcp-go-sdk](./mcp/sdk) - [MCP 官方 Go SDK v1.0.0 正式发布：Go 生态的模型上下文协议步入稳定时代](https://jianghushinian.cn/2025/10/08/mcp-go-sdk/)\n\n- [blades](./go-kratos/blades) - [AI Agent 生态再添一员，Kratos 带着他的武器 Blades 走来了！](https://jianghushinian.cn/2025/09/29/go-kratos-blades/)\n\n- [sync/pool](./sync/pool) - [Go 并发控制：sync.Pool 详解](https://jianghushinian.cn/2025/09/07/sync-pool/)\n\n- [testing/synctest](./test/synctest) - [使用 testing/synctest 测试并发代码](https://jianghushinian.cn/2025/09/05/testing-synctest/)\n\n- [doc.go](./doc/docgo) - [Go 项目中的 doc.go 文件是干嘛的？](https://jianghushinian.cn/2025/07/27/doc-go/)\n\n- [iterator](./iterator) - [万字长文：彻底掌握 Go 1.23 中的迭代器](https://jianghushinian.cn/2025/07/17/go-iterator/)\n\n- [empty/context-key](./struct/empty/context-key) - [在 Go 中为什么推荐使用空结构体作为 Context 的 key](https://jianghushinian.cn/2025/06/08/empty-struct-as-key-of-ctx/)\n\n- [fsm](./fsm) - [Go 语言 fsm 源码解读，这一次让你彻底学会有限状态机](https://jianghushinian.cn/2025/06/01/fsm-source-code/)\n\n- [fsm](./fsm) - [在 Go 中如何使用有限状态机优雅解决程序中状态转换问题](https://jianghushinian.cn/2025/05/25/fsm/)\n\n- [mcp-gateway](./mcp-gateway) - [使用 MCP Gateway 一键将你的 HTTP 接口转换成 MCP Server](https://jianghushinian.cn/2025/05/14/mcp-gateway/)\n\n- [goroutine/workerpool](./goroutine/workerpool) - [在 Go 语言中如何实现协程池](https://jianghushinian.cn/2025/05/09/goroutine-workerpool/)\n\n- [io/discard](./io/discard) - [Go 语言中你不知道的 io.Discard 妙用](https://jianghushinian.cn/2025/04/18/io-discard/)\n\n- [automaxprocs](./automaxprocs) - [使用 Uber automaxprocs 正确设置 Go 程序线程数](https://jianghushinian.cn/2025/04/13/automaxprocs/)\n\n- [air](./air) - [效率工具：使用 air 热重载 Go 应用程序](https://jianghushinian.cn/2025/04/03/air/)\n\n- [error/k8s-apimachinery-util-errors](./error/k8s-apimachinery-util-errors) - [使用 K8s Aggregate 聚合你的错误列表](https://jianghushinian.cn/2025/03/29/k8s-aggregate-error/)\n\n- [error/go-multierror](./error/go-multierror) - [go-multierror: 更方便的处理你的错误列表](https://jianghushinian.cn/2025/03/23/go-multierror/)\n\n- [nightwatch](./nightwatch) - [如何基于 Go 语言设计一个简洁优雅的分布式任务系统](https://jianghushinian.cn/2025/03/09/nightwatch/)\n\n- [redsync](./redsync) - [在 Go 中如何使用分布式锁解决并发问题？](https://jianghushinian.cn/2025/03/02/redsync/)\n\n- [cron](./cron) - [在 Go 中使用 cron 执行定时任务](https://jianghushinian.cn/2025/02/23/cron/)\n\n- [sync/map/concurrent-map](./sync/map/concurrent-map) - [Go 并发编程：如何实现一个并发安全的 map](https://jianghushinian.cn/2025/02/16/concurrent-map/)\n\n- [sync/map](./sync/map) - [Go 并发控制：sync.Map 详解](https://jianghushinian.cn/2025/02/10/sync-map/)\n\n- [iox/multi_bytes.go](./iox/multi_bytes.go) - [在 Go 中如何将 [][]byte 转为 io.Reader ？](https://jianghushinian.cn/2025/02/07/iox-multi-bytes/)\n\n- [2025-spring-festival-magic](./2025-spring-festival-magic) - [用 Go 语言还原 2025 刘谦春晚魔术！](https://jianghushinian.cn/2025/01/30/2025-spring-festival-magic/)\n\n- [x/sync/semaphore](./x/sync/semaphore) - [Go 并发控制：semaphore 详解](https://jianghushinian.cn/2025/01/21/x-sync-semaphore/)\n\n- [os/exec](./os/exec) - [Go os/exec 极速入门](https://jianghushinian.cn/2025/01/16/os-exec/)\n\n- [tempredis](./tempredis) - [超简单！用 Go 启动 Redis 实例](https://jianghushinian.cn/2025/01/08/go-tempredis/)\n\n- [sync/cond](./sync/cond) - [Go 并发控制：sync.Cond 详解](https://jianghushinian.cn/2024/12/29/sync-cond/)\n\n- [sync/waitgroup](./sync/waitgroup) - [Go 并发控制：sync.WaitGroup 详解](https://jianghushinian.cn/2024/12/23/sync-waitgroup/)\n\n- [context](./context) - [Go 源码是如何解决测试代码循环依赖问题的？](https://jianghushinian.cn/2024/12/16/context-x-test/)\n\n- [context](./context) - [Go 并发控制：context 源码解读](https://jianghushinian.cn/2024/12/09/context/)\n\n- [goroutine/id](./goroutine/id) - [在 Go 中如何获取 goroutine 的 id？](https://jianghushinian.cn/2024/12/04/goroutine-id/)\n\n- [x/sync/singleflight](./x/sync/singleflight) - [Go 并发控制：singleflight 详解](https://jianghushinian.cn/2024/11/24/x-sync-singleflight/)\n\n- [cors](./cors) - [2024 都要过完了，我不允许你在 Go 中还不会解决 CORS 跨域问题](https://jianghushinian.cn/2024/11/18/go-cors/)\n\n- [sync/once](./sync/once) - [Go 并发控制：sync.Once 详解](https://jianghushinian.cn/2024/11/11/sync-once/)\n\n- [x/sync/errgroup](./x/sync/errgroup) - [Go 并发控制：errgroup 详解](https://jianghushinian.cn/2024/11/04/x-sync-errgroup/)\n\n- [tools/addlicense](./tools/addlicense) - [一行命令为项目文件添加开源协议头](https://jianghushinian.cn/2024/10/20/go-tools-addlicense/)\n\n- [error/defer-panic-recover](./error/defer-panic-recover) - [Go 错误处理指北：Defer、Panic、Recover 三剑客](https://jianghushinian.cn/2024/10/13/go-error-guidelines-defer-panic-recover/)\n\n- [error/handling-error](./error/handling-error) - [Go 错误处理指北：如何优雅的处理错误？](https://jianghushinian.cn/2024/10/01/go-error-guidelines-error-handling/)\n\n- [terminal/colors](./terminal/colors) - [厌倦了黑底白字？用 Go 给终端点颜色瞧瞧！](https://jianghushinian.cn/2024/09/27/go-terminal-colors/)\n\n- [error/pkg-errors](./error/pkg-errors) - [Go 错误处理指北：pkg/errors 源码解读](https://jianghushinian.cn/2024/09/14/go-error-guidelines-pkg-errors/)\n\n- [error/error-exception-errno](./error/error-exception-errno) - [Go 错误处理指北：Error vs Exception vs ErrNo](https://jianghushinian.cn/2024/09/06/go-error-guidelines-error-exception-errno/)\n\n- [design-patterns/builder](./design-patterns/builder) - [Builder 模式在 Go 语言中的应用](https://jianghushinian.cn/2024/08/26/go-design-patterns-builder/)\n\n- [gracefulstop](./gracefulstop) - [Go 程序如何实现优雅退出？来看看 K8s 是怎么做的](https://jianghushinian.cn/2024/08/22/go-gracefulstop/)\n\n- [design-patterns/adapter](./design-patterns/adapter) - [适配器模式在 Go 语言中的应用](https://jianghushinian.cn/2024/08/04/go-design-patterns-adapter/)\n\n- [struct/encoding-json](./struct/encoding-json) - [在 Go 中如何使用反射实现简易版 encoding/json](https://jianghushinian.cn/2024/07/28/struct-encoding-json/)\n\n- [autocorrect](./autocorrect) - [中文文案排版指北](https://jianghushinian.cn/2024/07/20/chinese-copywriting-guidelines/)\n\n- [embed](./embed) - [在 Go 中如何使用 go:embed 指令嵌入静态文件](https://jianghushinian.cn/2024/07/12/go-embed/)\n\n- [struct/memory-layouts](./struct/memory-layouts) - [Go 语言中的结构体内存对齐你了解吗？](https://jianghushinian.cn/2024/07/07/do-you-understand-the-memory-alignment-of-structs-in-the-go/)\n\n- [log/slog](./log/slog) - [万字解析 Go 官方结构化日志包 slog](https://jianghushinian.cn/2024/06/24/go-s-official-structured-log-package-slog/)\n\n- [struct/non-comparable](./struct/non-comparable) - [在 Go 中如何让结构体不可比较？](https://jianghushinian.cn/2024/06/15/how-to-make-structures-incomparable-in-go/)\n\n- [wire](./wire) - [在 Go 中如何优雅的使用 wire 依赖注入工具提高开发效率？](https://jianghushinian.cn/2024/06/09/how-can-you-elegantly-use-dependency-injection-in-go-to-improve-development-efficiency/)\n\n- [struct/empty](./struct/empty) - [Go 中空结构体的用法，我帮你总结全了！](https://jianghushinian.cn/2024/06/02/i-have-summarized-all-the-usages-of-empty-struct-in-go-for-you/)\n\n- [grequests](./grequests) - [GRequests: 让 HTTP 服务人类](https://jianghushinian.cn/2024/05/30/grequests-http-for-humans/)\n\n- [test/xgo](./test/xgo) - [xgo: 一款新鲜出炉的 Go 代码测试利器](https://jianghushinian.cn/2024/05/19/xgo-a-fresh-go-code-testing-tool/)\n\n- [2024-spring-festival-gala-magic](./2024-spring-festival-gala-magic) - [用 Go 语言实现刘谦 2024 春晚魔术，神还原「尼格买提」汗流浃背的尴尬瞬间!](https://jianghushinian.cn/2024/02/10/use-go-to-realize-liu-qian-s-2024-spring-festival-gala-magic/)\n\n- [test/supplement](./test/supplement) - [在 Go 中如何编写测试代码内容补充](https://jianghushinian.cn/2023/07/23/how-to-write-testing-in-go-content-supplement/)\n\n- [test/monkeypatching](./test/monkeypatching) - [测试代码终极解决方案 Monkey Patching](https://jianghushinian.cn/2023/07/22/the-ultimate-solution-to-test-code-monkey-patching/)\n\n- [test/testable](./test/testable) - [在 Go 中如何编写出可测试的代码](https://jianghushinian.cn/2023/07/22/how-to-write-testable-code-in-go/)\n\n- [test/file](./test/file) - [在 Go 语言单元测试中如何解决文件依赖问题](https://jianghushinian.cn/2023/07/19/how-to-resolve-file-dependencies-in-go-testing/)\n\n- [test/redis](./test/redis) - [在 Go 语言单元测试中如何解决 Redis 存储依赖问题](https://jianghushinian.cn/2023/07/18/how-to-resolve-redis-dependencies-in-go-testing/)\n\n- [test/mysql](./test/mysql) - [在 Go 语言单元测试中如何解决 MySQL 存储依赖问题](https://jianghushinian.cn/2023/07/16/how-to-resolve-mysql-dependencies-in-go-testing/)\n\n- [test/http](./test/http) - [在 Go 语言单元测试中如何解决 HTTP 网络依赖问题](https://jianghushinian.cn/2023/07/15/how-to-resolve-http-dependencies-in-go-testing/)\n\n- [test/getting-started](./test/getting-started) - [在 Go 中如何编写测试代码](https://jianghushinian.cn/2023/07/09/how-to-write-testing-in-go/)\n\n- [sqlx](./sqlx) - [在 Go 中使用 sqlx 替代 database/sql 操作数据库](https://jianghushinian.cn/2023/06/15/using-sqlx-instead-of-database-sql-for-database-operations-in-go/)\n\n- [database/sql](./database/sql) - [在 Go 中如何使用 database/sql 来操作数据库](https://jianghushinian.cn/2023/06/05/how-to-use-database-sql-to-operate-database-in-go/)\n\n- [gorm](./gorm) - [Go 语言流行 ORM 框架 GORM 使用介绍](https://jianghushinian.cn/2023/05/27/go-popular-orm-framework-gorm-introduction/)\n\n- [cobra](./cobra) - [Go 语言现代命令行框架 Cobra 详解](https://jianghushinian.cn/2023/05/08/go-modern-command-line-framework-cobra-details/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjianghushinian%2Fblog-go-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjianghushinian%2Fblog-go-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjianghushinian%2Fblog-go-example/lists"}