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

error-handlingerrorsgo13
0 likes · 25 min read
Deep Dive into Go's pkg/errors Package: Design, Implementation, and Usage
Go Programming World
Go Programming World
Aug 13, 2024 · Operations

Building Multi‑Platform Docker Images with Docker Buildx

This tutorial explains how to install Docker Buildx, create and manage builders, and use QEMU emulation or Go cross‑compilation to produce multi‑platform Docker images, covering command syntax, driver options, global BuildKit variables, and how to push or load the resulting images.

Cross-CompilationDockerQEMU
0 likes · 20 min read
Building Multi‑Platform Docker Images with Docker Buildx
Go Programming World
Go Programming World
Aug 12, 2024 · Cloud Native

Setting /dev/shm Size for Kubernetes Pods: A Production Troubleshooting Guide

During a production deployment of large language model training on Kubernetes, a pod failed due to insufficient /dev/shm shared memory; the article details the root cause, explores missing pod spec parameters, and presents a complete solution using an emptyDir volume with medium: Memory and sizeLimit to configure shared memory.

KubernetesemptyDirpod
0 likes · 11 min read
Setting /dev/shm Size for Kubernetes Pods: A Production Troubleshooting Guide
Go Programming World
Go Programming World
Aug 4, 2024 · Fundamentals

Applying the Adapter Pattern in Go: From Payment Systems to Multi‑Cloud Management and Model Training Platforms

This article explains the Adapter design pattern, illustrates its real‑world analogy, demonstrates a complete Go implementation for payment processing, and shows how the pattern can be used in production scenarios such as a multi‑cloud management platform and a model‑training service, highlighting its role in unifying incompatible interfaces.

Adapter PatternCloud NativeDesign Patterns
0 likes · 13 min read
Applying the Adapter Pattern in Go: From Payment Systems to Multi‑Cloud Management and Model Training Platforms
Go Programming World
Go Programming World
Jul 21, 2024 · Fundamentals

Chinese Copywriting Guidelines: Formatting Rules for Code Comments, README, and Documentation

This article introduces the Chinese copywriting guidelines, explaining why spaces between Chinese and English, numbers, units, and punctuation matter, providing concrete examples and best‑practice rules, and showcasing the autocorrect CLI tool and language libraries that can automatically enforce these formatting standards.

CLI toolChinese copywritingFormatting
0 likes · 16 min read
Chinese Copywriting Guidelines: Formatting Rules for Code Comments, README, and Documentation
Go Programming World
Go Programming World
Jul 14, 2024 · Backend Development

Embedding Static Resources in Go with //go:embed

Since Go 1.16, the //go:embed directive allows developers to embed files, directories, or entire static assets directly into the compiled binary, simplifying deployment; this article explains the directive, its three embedding methods, usage in HTTP servers, unit tests, handling parent directories, and important considerations.

HTTP serverembedgo1.16
0 likes · 24 min read
Embedding Static Resources in Go with //go:embed
Go Programming World
Go Programming World
Jul 4, 2024 · Fundamentals

Understanding False Sharing and Cache Padding in Go

This article explains the concept of false sharing caused by CPU cache line interactions, demonstrates how cache padding can mitigate the performance penalty, and provides Go benchmark code and results to illustrate the impact on multi‑core concurrency.

False sharingcache paddingconcurrency
0 likes · 8 min read
Understanding False Sharing and Cache Padding in Go
Go Programming World
Go Programming World
Jun 13, 2024 · Backend Development

Using Wire for Dependency Injection in Go Web Applications: A Practical Guide

This article demonstrates how to apply Google’s Wire tool in a production‑grade Go web service, covering project layout, a four‑layer architecture, code generation for constructors, comparisons with dig and inject, and practical CLI usage to streamline dependency injection and improve development efficiency.

ArchitectureBackendDependency Injection
0 likes · 23 min read
Using Wire for Dependency Injection in Go Web Applications: A Practical Guide