Go Programming World
Author

Go Programming World

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

69
Articles
0
Likes
476
Views
0
Comments
Recent Articles

Latest from Go Programming World

69 recent articles
Go Programming World
Go Programming World
Feb 11, 2025 · Backend Development

Deep Dive into Go's sync.Map: Implementation, Usage, and Performance

An in‑depth exploration of Go’s sync.Map reveals its concurrent map implementation, covering core structures, read‑only and dirty maps, entry states, and detailed walkthroughs of Store, Load, Delete, Range, Clear, and advanced operations like LoadOrStore, CompareAndSwap, and CompareAndDelete with code examples.

Goconcurrencymap
0 likes · 30 min read
Deep Dive into Go's sync.Map: Implementation, Usage, and Performance
Go Programming World
Go Programming World
Jan 17, 2025 · Backend Development

A Quick Guide to Go's os/exec Package: Running External Commands and Real‑World Use Cases

This article introduces Go's built‑in os/exec package, explains its exported types and methods, demonstrates how to run commands synchronously or in the background, capture output, handle pipes, environment variables, working directories, and shows a practical case study using the tempredis library to start a Redis server programmatically.

GoProcess ManagementRedis
0 likes · 21 min read
A Quick Guide to Go's os/exec Package: Running External Commands and Real‑World Use Cases
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.

go-redistempredistesting
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.

Condition VariableQueueconcurrency
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.

cancellationconcurrencycontext
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.

CacheGoconcurrency
0 likes · 26 min read
Understanding Go's singleflight: Request Merging, Implementation and Use Cases