Tagged articles
1622 articles
Page 7 of 17
MaGe Linux Operations
MaGe Linux Operations
Jun 20, 2024 · Backend Development

Master Go’s net.Dial: From Socket Basics to HTTP Clients

This article explains Go's socket programming workflow, detailing the traditional steps of creating, binding, listening, and communicating over sockets, then shows how net.Dial simplifies connections for TCP, UDP, and ICMP, and demonstrates practical HTTP client usage with code examples.

GoHTTPNetwork programming
0 likes · 11 min read
Master Go’s net.Dial: From Socket Basics to HTTP Clients
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jun 19, 2024 · Backend Development

Building and Deploying a Go‑Gin Web Application with Docker: From Installation to Comparison with Koa

This tutorial walks through installing Go, using the Go‑Gin framework, creating a simple cron‑enabled web service, building Docker images with and without multi‑stage builds, pushing them to a registry, deploying on a server, and comparing the final image size with an equivalent Koa implementation.

DockerGinGo
0 likes · 11 min read
Building and Deploying a Go‑Gin Web Application with Docker: From Installation to Comparison with Koa
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jun 18, 2024 · Backend Development

Graceful Shutdown in Go: Designing Robust Service Termination with the GS Library

This article describes a real‑world incident where rapid pod scaling caused order‑submission failures in a serverless e‑commerce platform, analyzes the root causes, and presents a Go‑based graceful‑shutdown solution—including ASyncClose, SyncClose, and ForceSyncClose modes—implemented in the open‑source GS library to help developers reliably terminate services.

GoGraceful ShutdownServerless
0 likes · 21 min read
Graceful Shutdown in Go: Designing Robust Service Termination with the GS Library
Open Source Tech Hub
Open Source Tech Hub
Jun 14, 2024 · Backend Development

Why Workerman Beats Go in Simple HelloWorld Benchmarks on an Aliyun Server

The author benchmarked Go's standard HTTP library against PHP frameworks Workerman, Webman, and Swoole (including coroutine mode) on a 4‑core Ubuntu 20.04 Aliyun instance using ApacheBench with and without keep‑alive, revealing that Workerman and Webman often outperform Go in raw request‑per‑second throughput.

GoWebmanWorkerman
0 likes · 6 min read
Why Workerman Beats Go in Simple HelloWorld Benchmarks on an Aliyun Server
21CTO
21CTO
Jun 14, 2024 · Fundamentals

2024 Programming Language Rankings: What SlashData’s Survey Reveals

SlashData’s 26th Developer Nation survey, covering over 10,000 developers from 135 countries, shows JavaScript remains the most popular language, Python overtakes Java for second place, and emerging languages like Rust and Go experience rapid growth, while new developers face distinct adoption challenges.

2024 trendsGoJavaScript
0 likes · 6 min read
2024 Programming Language Rankings: What SlashData’s Survey Reveals
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.

BackendGoWeb Development
0 likes · 23 min read
Using Wire for Dependency Injection in Go Web Applications: A Practical Guide
FunTester
FunTester
Jun 11, 2024 · Backend Development

Mastering High‑Performance Structured Logging in Go with Uber’s Zap

This guide introduces Uber’s open‑source Zap library for Go, explains its performance‑focused features, shows how to install and configure it, and provides step‑by‑step code examples for basic logging, sugared logging, level control, file output, and log rotation.

GoZAPbackend-development
0 likes · 15 min read
Mastering High‑Performance Structured Logging in Go with Uber’s Zap
Open Source Linux
Open Source Linux
Jun 7, 2024 · Backend Development

How Docker Transforms Go Web App Development and Deployment

This tutorial explains how Docker can streamline building, testing, and deploying Go web applications, introduces the use of Semaphore for continuous deployment, and walks through creating development and production Dockerfiles, configuring CI/CD pipelines, and managing updates on the server.

Continuous DeploymentDockerGo
0 likes · 25 min read
How Docker Transforms Go Web App Development and Deployment
Top Architect
Top Architect
Jun 3, 2024 · Backend Development

Understanding Delay Queues and Implementing Them with JDK, RabbitMQ, Redis, and lmstfy

This article explains the concept, use cases, and common implementations of delay queues—including JDK's DelayQueue, RabbitMQ plugins, and Redis ZSet—followed by a detailed guide to installing, configuring, and using the open‑source lmstfy project, and concludes with promotional information for ChatGPT‑related services.

BackendGoMessage Queue
0 likes · 14 min read
Understanding Delay Queues and Implementing Them with JDK, RabbitMQ, Redis, and lmstfy
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.

APIGoHTTP
0 likes · 10 min read
Using GRequests: A Go Clone of Python Requests for Simplified HTTP Requests
MaGe Linux Operations
MaGe Linux Operations
Jun 1, 2024 · Fundamentals

Mastering Go Slices: Creation, Manipulation, and Performance Tips

Go slices are dynamic, flexible data structures built on arrays, offering automatic growth, efficient memory use, and powerful operations such as creation via make or literals, slicing, appending, copying, iteration, and passing to functions, with detailed examples and visualizations illustrating their internal mechanics.

GoGolangMemory
0 likes · 17 min read
Mastering Go Slices: Creation, Manipulation, and Performance Tips
Ops Development & AI Practice
Ops Development & AI Practice
Jun 1, 2024 · Databases

How Go’s database/sql Injects MySQL Drivers: A Deep Dive

This article explains how Go’s standard database/sql package uses a driver registration mechanism to integrate third‑party MySQL drivers, detailing the global driver map, registration function, init process, and a complete example showing how to define, register, and use a custom MySQL driver.

GoMySQL driverdatabase/sql
0 likes · 7 min read
How Go’s database/sql Injects MySQL Drivers: A Deep Dive
Ops Development & AI Practice
Ops Development & AI Practice
Jun 1, 2024 · Backend Development

Mastering Dependency Injection in Go with Google Wire

This article introduces Google Wire, a static‑analysis‑based dependency injection tool for Go, covering its key features, installation steps, core usage patterns—including defining dependencies, creating providers, generating code, and best practices such as modular management, interface abstraction, and testing with mock implementations.

GoGoogle WireProvider
0 likes · 8 min read
Mastering Dependency Injection in Go with Google Wire
Ops Development & AI Practice
Ops Development & AI Practice
Jun 1, 2024 · Backend Development

How to Build a Name Injection Registry in Go for Flexible Plugins

This guide walks through creating a name‑based injection system in Go by defining a processor interface, implementing concrete processors, building a registration map with init functions, and demonstrating usage in a main program, while also covering best practices such as global variable handling, initialization order, and error checking.

GoPlugin SystemRegistry
0 likes · 5 min read
How to Build a Name Injection Registry in Go for Flexible Plugins
Ops Development & AI Practice
Ops Development & AI Practice
May 31, 2024 · Backend Development

Build a Go CLI to Connect and Query Oracle DB in Minutes

Learn how to create a Go-based command-line tool that accepts user-supplied parameters to connect to an Oracle database using the loginWithServiceName function, execute arbitrary SQL queries, and display results, complete with full source code, flag parsing, and error handling.

CLIGoOracle
0 likes · 5 min read
Build a Go CLI to Connect and Query Oracle DB in Minutes
Ops Development & AI Practice
Ops Development & AI Practice
May 30, 2024 · Fundamentals

Mastering UDP in Go: Build Low‑Latency Network Apps with Simple Code

This article explains the characteristics and ideal use cases of UDP, then walks through step‑by‑step Go code for creating UDP connections, sending and receiving datagrams, and a complete client‑server example, helping developers leverage UDP’s low latency and lightweight nature for real‑time communication, streaming, and IoT scenarios.

DatagramGoNetwork programming
0 likes · 10 min read
Mastering UDP in Go: Build Low‑Latency Network Apps with Simple Code
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 CodesError Handling
0 likes · 22 min read
Standardizing RESTful API Error Handling with Business Error Codes and an Error Package in Go
DaTaobao Tech
DaTaobao Tech
May 29, 2024 · Backend Development

Guide to Setting Up a Go Development Environment and Build Workflow

Java developers can quickly establish a Go development environment by installing Homebrew, Go, and the Delve debugger, configuring essential environment variables, choosing an IDE such as GoLand or VS Code, organizing projects with standard cmd/internal layouts, managing dependencies via go.mod, automating builds with a Makefile, and debugging or packaging the resulting binaries.

Build AutomationDevelopment EnvironmentGo
0 likes · 20 min read
Guide to Setting Up a Go Development Environment and Build Workflow
Ops Development & AI Practice
Ops Development & AI Practice
May 27, 2024 · Backend Development

Decoupling Gin Handlers with Dependency Injection in Go

This article explains how to apply Dependency Injection in the Go Gin framework to separate routing logic from business services, reducing code coupling, improving testability, and enhancing reusability through concrete interface definitions, a simple DI container, and practical code examples.

BackendDesign PatternsGin
0 likes · 6 min read
Decoupling Gin Handlers with Dependency Injection in Go
FunTester
FunTester
May 27, 2024 · Backend Development

Understanding Unix Domain Sockets and a Go Implementation

This article explains Unix domain sockets as a high‑performance inter‑process communication mechanism, describes their types and workflow, outlines advantages and typical use cases, and provides a complete Go example of a server and client communicating via a Unix socket.

GoIPCInterprocess Communication
0 likes · 7 min read
Understanding Unix Domain Sockets and a Go Implementation
MaGe Linux Operations
MaGe Linux Operations
May 23, 2024 · Cloud Native

How to Slash Server Load: Optimizing Go Apps on Kubernetes

This article explains how to reduce server load and improve performance of Go applications on Kubernetes by using lightweight base images, fine‑tuning resource limits, adjusting garbage‑collection settings, employing connection pools, configuring health probes, and leveraging autoscaling, load balancing, and caching techniques.

Cloud NativeGoKubernetes
0 likes · 19 min read
How to Slash Server Load: Optimizing Go Apps on Kubernetes
MaGe Linux Operations
MaGe Linux Operations
May 22, 2024 · Backend Development

Why Switch from PHP to Go? Boosting Live‑Streaming Concurrency

The article explains why a backend developer moved from PHP to Go, highlights Go’s popularity and simplicity, and demonstrates how Go’s concurrency primitives like sync.WaitGroup and errgroup can transform serial live‑stream data fetching into parallel execution, drastically reducing request latency.

GoWaitGroupbackend-development
0 likes · 9 min read
Why Switch from PHP to Go? Boosting Live‑Streaming Concurrency
Tencent Cloud Developer
Tencent Cloud Developer
May 22, 2024 · Backend Development

Comprehensive Guide to Go pprof and trace Tools for Performance Analysis

This comprehensive guide teaches Go developers how to generate CPU, memory, and goroutine profiles with pprof, interpret SVG, top, source, and peek visualizations, understand the runtime’s sampling and allocation internals, use the trace tool to analyze events, and apply these techniques to real‑world optimizations such as speeding up a Mandelbrot image generator.

Goperformance profilingpprof
0 likes · 57 min read
Comprehensive Guide to Go pprof and trace Tools for Performance Analysis
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
MaGe Linux Operations
MaGe Linux Operations
May 19, 2024 · Databases

How to Deploy Xenon: A Raft‑Based MySQL HA Solution with Semi‑Sync and Parallel Replication

This guide walks through deploying Xenon, an open‑source Raft‑based MySQL high‑availability solution, covering environment setup, installation of Go and Percona XtraBackup, configuring Xenon’s JSON, starting the cluster, monitoring status, and troubleshooting backup failures caused by misconfigured host settings.

BackupDatabase ReplicationGo
0 likes · 8 min read
How to Deploy Xenon: A Raft‑Based MySQL HA Solution with Semi‑Sync and Parallel Replication
Java Tech Enthusiast
Java Tech Enthusiast
May 18, 2024 · Industry Insights

What Would Happen If Google Dismisses the Go Core Team?

The article analyzes recent rumors of Google laying off many Go core developers, outlines what resources and support could be lost, explores possible scenarios for the language’s future, and compares the situation to Rust’s evolution, highlighting risks for the Go ecosystem.

CNCFGoGoogle
0 likes · 6 min read
What Would Happen If Google Dismisses the Go Core Team?
Ops Development & AI Practice
Ops Development & AI Practice
May 17, 2024 · Backend Development

Boost Go Performance: Mastering sync.Pool for Object Reuse

This article explains how Go's sync.Pool enables efficient object reuse to cut memory allocation and garbage‑collection overhead, detailing its features, basic usage, underlying mechanics, ideal scenarios, performance‑boosting examples, and important considerations for safe and effective implementation.

GoObject Poolingsync.Pool
0 likes · 8 min read
Boost Go Performance: Mastering sync.Pool for Object Reuse
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.

BackendGoHTTP
0 likes · 12 min read
Using Monkey Patching with gomonkey for Unit Testing in Go
Ops Development & AI Practice
Ops Development & AI Practice
May 13, 2024 · Fundamentals

Unlocking Go's Power: Master Higher-Order Functions with Real Code

Go treats functions as first‑class citizens, enabling higher‑order functions that accept other functions as arguments or return them, and this article explains their definition, demonstrates practical examples—including callbacks, closures, and functional‑style map/filter operations—while highlighting common use cases such as decorators and event handling.

GoHigher-Order Functions
0 likes · 5 min read
Unlocking Go's Power: Master Higher-Order Functions with Real Code
Ops Development & AI Practice
Ops Development & AI Practice
May 12, 2024 · Cloud Native

How to Efficiently Detect Changes in Complex Kubernetes Operator Objects

This article explains how to efficiently detect changes in complex Kubernetes Operator objects by comparing current and desired states using methods such as reflect.DeepEqual, hash‑based comparison, JSON Patch generation, deep copying, and custom comparison functions, and offers best‑practice guidance for reliable controller implementations.

Change DetectionDeepEqualGo
0 likes · 8 min read
How to Efficiently Detect Changes in Complex Kubernetes Operator Objects
Ops Development & AI Practice
Ops Development & AI Practice
May 12, 2024 · Backend Development

Mastering Deep Copy in Go: A Complete Reflection-Based Implementation

This article explains how to implement a generic deep‑copy function in Go using reflection, detailing the Interface definition, the Copy and Iface wrappers, the recursive copyRecursive logic, and key techniques such as interface design and recursive traversal to produce fully independent copies of complex data structures.

GoReflectiondeep copy
0 likes · 6 min read
Mastering Deep Copy in Go: A Complete Reflection-Based Implementation
Go Programming World
Go Programming World
May 11, 2024 · Backend Development

Testing HTTP Applications in Go: Isolating External Dependencies

This article explains how to write reliable unit tests for Go HTTP applications by isolating external dependencies, covering server‑side handlers, client‑side monitoring, and using tools such as net/http/httptest, testify, and gock to create test doubles and mock HTTP services.

GoHTTPTestify
0 likes · 21 min read
Testing HTTP Applications in Go: Isolating External Dependencies
Ops Development & AI Practice
Ops Development & AI Practice
May 9, 2024 · Backend Development

When to Replace Pointer Receivers with Value Receivers in Go?

This article examines the trade‑offs of converting a Go method from a pointer receiver to a value receiver, illustrating the change with concrete code examples, outlining benefits such as simpler logic, zero‑value safety, clearer semantics, and offering guidance on when this refactor is appropriate.

Gocode safetymethod receiver
0 likes · 5 min read
When to Replace Pointer Receivers with Value Receivers in Go?
Ops Development & AI Practice
Ops Development & AI Practice
May 9, 2024 · Backend Development

Boost System and Driver Performance: Combining Go with Assembly

This article explains how integrating Go with assembly language can overcome Go's performance and low‑level control limits for system and driver development, covering basic concepts, integration methods, multi‑CPU architecture support, practical code examples, and the resulting performance and portability benefits.

AssemblyGoMulti-Architecture
0 likes · 6 min read
Boost System and Driver Performance: Combining Go with Assembly
MaGe Linux Operations
MaGe Linux Operations
May 9, 2024 · Fundamentals

Mastering Go Concurrency: How Goroutines Simplify Parallel Programming

Go’s goroutine model lets developers replace complex thread‑pool management with lightweight, runtime‑scheduled functions, enabling simple concurrent execution; this article explains how to launch single or multiple goroutines, synchronize them with WaitGroup, and understand the underlying G‑P‑M scheduler.

GoGoroutineParallel Programming
0 likes · 8 min read
Mastering Go Concurrency: How Goroutines Simplify Parallel Programming
Go Development Architecture Practice
Go Development Architecture Practice
May 9, 2024 · Backend Development

How to Organize a Scalable Go Project: Best Practices and Patterns

This guide outlines a comprehensive Go project layout—including cmd, pkg, internal, test, configs, and docs directories—alongside modular design principles, middleware usage, dependency injection, error handling, logging, database access layers, testing strategies, performance tuning, and documentation practices to improve code readability, maintainability, and scalability.

GoProject Structuredependency-injection
0 likes · 26 min read
How to Organize a Scalable Go Project: Best Practices and Patterns
Open Source Tech Hub
Open Source Tech Hub
May 8, 2024 · Databases

How Yearning Automates MySQL SQL Auditing and Rollback – A Complete Guide

Yearning is an open-source MySQL SQL audit platform built with Go and Vue.js that automates statement review, generates rollback scripts, provides audit logging, supports multi-channel notifications, and offers fine-grained permission control, with installation instructions and configuration details for rapid deployment.

Database SecurityGoSQL audit
0 likes · 5 min read
How Yearning Automates MySQL SQL Auditing and Rollback – A Complete Guide
MaGe Linux Operations
MaGe Linux Operations
May 8, 2024 · Fundamentals

Master Go Naming: Consistent, Concise, and Clear Conventions

This article explains how to choose consistent, short, and precise names in Go, covering general naming principles, the first rule about declaration‑use distance, CamelCase style, local variables, parameters, return values, receivers, exported identifiers, interface naming, error naming, package naming, import paths, and useful standard‑library examples.

Gobest practicescode style
0 likes · 6 min read
Master Go Naming: Consistent, Concise, and Clear Conventions
Ops Development & AI Practice
Ops Development & AI Practice
May 3, 2024 · Backend Development

Boost Go Performance with the Experimental arena Package: Design, Usage, and Benchmarks

This article explores Go's experimental arena library, detailing its design principles, core features such as fast allocation and memory reuse, suitable use cases like object pools and game development, provides a practical code example, and discusses performance benefits and limitations for high‑concurrency applications.

ArenaGoMemory Management
0 likes · 5 min read
Boost Go Performance with the Experimental arena Package: Design, Usage, and Benchmarks
Go Programming World
Go Programming World
May 2, 2024 · Backend Development

Comprehensive Guide to Using Viper for Go Application Configuration

This article provides an in‑depth tutorial on Viper, a full‑featured Go configuration library, covering its features, usage scenarios, loading priorities, reading from files, environment variables, command‑line flags, remote stores, and best practices for managing application settings.

BackendDevOpsGo
0 likes · 22 min read
Comprehensive Guide to Using Viper for Go Application Configuration
Ops Development & AI Practice
Ops Development & AI Practice
May 1, 2024 · Fundamentals

Mastering DTOs: Design Principles and Best Practices for Layered Architecture

Data Transfer Objects (DTOs) are essential for clean layered software design, and this article explains their purpose, key design principles such as encapsulation, orthogonality, and layer isolation, illustrates their role between presentation, service, and data layers, and provides a Go code example with benefits and challenges.

Design PatternsGodto
0 likes · 6 min read
Mastering DTOs: Design Principles and Best Practices for Layered Architecture
Go Programming World
Go Programming World
Apr 30, 2024 · Backend Development

A Comprehensive Guide to Using Uber's Zap Logging Library in Go

This article introduces Uber's open‑source Zap library for Go, explains its high‑performance, structured, leveled logging features, demonstrates basic and advanced usage with code examples, compares production and development configurations, shows how to use SugaredLogger, customize loggers, apply options, and integrate the library into custom logging packages.

GoSugaredLoggerZAP
0 likes · 19 min read
A Comprehensive Guide to Using Uber's Zap Logging Library in Go
MaGe Linux Operations
MaGe Linux Operations
Apr 30, 2024 · Fundamentals

Master Go's Conditional Statements: if, else, and Nested Logic Explained

This guide explains Go's conditional statements, covering the basic if syntax, the use of else and else‑if clauses, initialization statements, limitations such as the lack of a ternary operator, and provides multiple practical code examples illustrating simple, chained, and nested conditions.

Goconditional statementsif-else
0 likes · 7 min read
Master Go's Conditional Statements: if, else, and Nested Logic Explained
MaGe Linux Operations
MaGe Linux Operations
Apr 29, 2024 · Fundamentals

Unlocking Go’s Empty Interface: Store Any Type in One Variable

An empty interface in Go, defined as interface{}, can hold values of any type because it has no methods, enabling flexible data structures like slices, maps, and structs, and is commonly used in functions such as fmt.Println, though copying between typed and empty interface slices requires careful handling.

GoInterfaceempty interface
0 likes · 5 min read
Unlocking Go’s Empty Interface: Store Any Type in One Variable