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

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

BackendError HandlingGin
0 likes · 22 min read
Standardizing RESTful API Error Handling with Business Error Codes and an Error Package in Go
Go Programming World
Go Programming World
May 27, 2024 · Backend Development

Designing an Effective Go Web Project Directory Structure

This article explains the principles and recommended layout for organizing a large Go web project, covering readability, extensibility, standard Go project layout, and detailed descriptions of directories such as /cmd, /internal, /pkg, /configs, /deployments, and supporting files to improve maintainability and scalability.

Project StructureWebgolang-standards
0 likes · 11 min read
Designing an Effective Go Web Project Directory Structure
Go Programming World
Go Programming World
May 21, 2024 · Backend Development

Comprehensive Guide to Using sqlx with Go for Database Operations

This article provides an in‑depth tutorial on the sqlx package for Go, covering installation, type design, database connection methods, query execution, named parameters, transaction handling, prepared statements, unsafe scanning, field‑mapping customization, and practical code examples to simplify working with relational databases.

GoSQLsqlx
0 likes · 23 min read
Comprehensive Guide to Using sqlx with Go for Database Operations
Go Programming World
Go Programming World
May 16, 2024 · Backend Development

Using Monkey Patching with gomonkey for Unit Testing in Go

This article demonstrates how to apply Monkey Patching in Go using the gomonkey library to unit‑test a simple HTTP service, covering code examples, dependency analysis, patch creation, test execution parameters, and practical considerations such as inlining and concurrency limitations.

BackendGoMonkey Patching
0 likes · 12 min read
Using Monkey Patching with gomonkey for Unit Testing in Go