Go Programming World
Author

Go Programming World

Mobile version of tech blog https://jianghushinian.cn/, covering Golang, Docker, Kubernetes and beyond.

66
Articles
0
Likes
187
Views
0
Comments
Recent Articles

Latest from Go Programming World

66 recent articles
Go Programming World
Go Programming World
Jan 9, 2025 · Backend Development

Using tempredis to Launch Temporary Redis Instances for Go Testing

This article introduces the Go library tempredis, which can start and automatically clean up temporary Redis server instances for isolated testing, explains its main features, setup steps, API overview, and provides a complete example demonstrating how to integrate it with go-redis in a Go project.

Testinggo-redistempredis
0 likes · 9 min read
Using tempredis to Launch Temporary Redis Instances for Go Testing
Go Programming World
Go Programming World
Dec 30, 2024 · Backend Development

Understanding and Using sync.Cond in Go: Source Code Analysis and Practical Examples

This article explains the purpose, internal implementation, and correct usage patterns of Go's sync.Cond concurrency primitive, walks through its source code, demonstrates simple and advanced examples—including a custom concurrent waiting queue—and provides test cases to illustrate its behavior in real-world scenarios.

concurrencycondition variableexample
0 likes · 20 min read
Understanding and Using sync.Cond in Go: Source Code Analysis and Practical Examples
Go Programming World
Go Programming World
Dec 10, 2024 · Backend Development

Deep Dive into Go's Context Package: Design, Implementation, and Usage

This article thoroughly explains the design and implementation of Go's context package, covering its core interfaces, various concrete types, cancellation propagation, deadline handling, value storage, and the internal mechanisms that enable concurrent-safe control flow and data passing across context trees.

CancellationDeadlineconcurrency
0 likes · 30 min read
Deep Dive into Go's Context Package: Design, Implementation, and Usage
Go Programming World
Go Programming World
Nov 25, 2024 · Backend Development

Understanding Go's singleflight: Request Merging, Implementation and Use Cases

singleflight, a Go concurrency primitive from the x/sync package, merges duplicate in‑flight requests to reduce server load, with detailed usage examples, source code analysis, and discussion of its differences from sync.Once and typical application scenarios such as cache‑penetration, remote calls, and task deduplication.

CacheGoSingleflight
0 likes · 26 min read
Understanding Go's singleflight: Request Merging, Implementation and Use Cases
Go Programming World
Go Programming World
Sep 15, 2024 · Fundamentals

Deep Dive into Go's pkg/errors Package: Design, Implementation, and Usage

This article explains Go's error‑handling shortcomings, introduces the popular third‑party pkg/errors library, demonstrates how to wrap errors with additional context and stack traces, and provides a detailed line‑by‑line walkthrough of its source files (errors.go, go113.go, stack.go) to reveal the underlying design and implementation.

Stack Traceerror-handlingerrors
0 likes · 25 min read
Deep Dive into Go's pkg/errors Package: Design, Implementation, and Usage