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

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

KubernetesPodShared Memory
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 PatternGoKubernetes
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 copywritingautocorrect
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.

embedgo1.16http server
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.

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

ArchitectureGoWeb development
0 likes · 23 min read
Using Wire for Dependency Injection in Go Web Applications: A Practical Guide
Go Programming World
Go Programming World
Jun 4, 2024 · Backend Development

Understanding and Using Empty Structs (struct{}) in Go

This article explains the zero‑size nature of Go's empty struct, demonstrates how its memory address behaves, shows its impact on struct alignment, and presents multiple practical patterns such as set implementation, large arrays, signal channels, no‑op methods, interface stubs, and the noCopy identifier.

MemorySetchannel
0 likes · 17 min read
Understanding and Using Empty Structs (struct{}) in Go
Go Programming World
Go Programming World
Jun 3, 2024 · Backend Development

Using GRequests: A Go Clone of Python Requests for Simplified HTTP Requests

This article introduces the Go library grequests—a clone of Python's requests—demonstrates its installation, compares its API with net/http, and provides concise examples for GET, POST, query strings, basic authentication, and file upload/download, highlighting its simplicity and advantages for HTTP client development.

APIFile UploadGo
0 likes · 10 min read
Using GRequests: A Go Clone of Python Requests for Simplified HTTP Requests
Go Programming World
Go Programming World
May 30, 2024 · Backend Development

Standardizing RESTful API Error Handling with Business Error Codes and an Error Package in Go

This article explains how to design a unified business error‑code system for RESTful APIs, demonstrates the structure and format of such codes, provides a Go implementation with structs, interfaces and formatting methods, and shows practical usage in a Gin web server including logging and notification strategies.

Error HandlingGinGo
0 likes · 22 min read
Standardizing RESTful API Error Handling with Business Error Codes and an Error Package in Go