Tagged articles
1622 articles
Page 8 of 17
Ops Development & AI Practice
Ops Development & AI Practice
Apr 26, 2024 · Backend Development

Mastering Go's unsafe Package: When and How to Use It Safely

This article explains Go's unsafe package, covering its core concepts—Pointer, Sizeof, and Offsetof—provides practical code examples, outlines suitable scenarios such as system calls and performance tuning, and highlights the associated risks and best‑practice precautions.

GoMemorySystems Programming
0 likes · 5 min read
Mastering Go's unsafe Package: When and How to Use It Safely
ByteDance SYS Tech
ByteDance SYS Tech
Apr 26, 2024 · Backend Development

How io_uring Integration Boosts Netpoll Throughput and Slashes Latency

This article examines the integration of Linux io_uring into ByteDance's high‑performance Netpoll NIO library, detailing architectural changes, receive/send workflows, benchmarking methodology, and results that show over 10% higher throughput and 20‑40% lower latency while eliminating system calls.

GoHigh‑Performance Networkingbenchmark
0 likes · 18 min read
How io_uring Integration Boosts Netpoll Throughput and Slashes Latency
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Apr 25, 2024 · Backend Development

Design and Implementation of a Generic Connection Pool in Go (Conecta)

This article explains the motivation, design principles, and implementation details of Conecta, a lightweight, configurable Go library that provides a universal connection pool for various services such as databases, TCP/UDP, and custom connections, complete with extensible callbacks and background health checks.

Connection PoolGobackend-development
0 likes · 19 min read
Design and Implementation of a Generic Connection Pool in Go (Conecta)
Ops Development & AI Practice
Ops Development & AI Practice
Apr 22, 2024 · Fundamentals

Mastering Go Generics: Real-World Examples and Practical Insights

This article introduces Go's groundbreaking generics feature introduced in version 1.18, explains its syntax and type constraints, demonstrates practical implementations such as generic functions, data structures, and methods with full code examples, and evaluates the benefits, challenges, and future prospects of using generics in Go.

Data StructuresGenericsGo
0 likes · 7 min read
Mastering Go Generics: Real-World Examples and Practical Insights
MaGe Linux Operations
MaGe Linux Operations
Apr 20, 2024 · Backend Development

Mastering Go Concurrency: Goroutines, Scheduler, Race Detection & Channels

This article explains Go's concurrency model, detailing how goroutines are scheduled onto logical processors, how to create and run them, handle race conditions with atomic operations, mutexes, and the race detector, and share data safely using unbuffered and buffered channels with practical code examples.

ChannelGoGoroutine
0 likes · 19 min read
Mastering Go Concurrency: Goroutines, Scheduler, Race Detection & Channels
MaGe Linux Operations
MaGe Linux Operations
Apr 19, 2024 · Cloud Native

How Docker Transforms Go Web App Development and Continuous Deployment

This tutorial shows how to containerize a Go web application with Docker, use Beego for routing, set up development and production Dockerfiles, run automated tests, and integrate Semaphore for continuous integration and deployment, enabling consistent environments and streamlined workflows.

DockerGoWeb Development
0 likes · 24 min read
How Docker Transforms Go Web App Development and Continuous Deployment
Ops Development & AI Practice
Ops Development & AI Practice
Apr 18, 2024 · Operations

How to Check and Fix Linux File Permissions with Go

This article explains why proper file permissions and ownership are crucial for Linux security and provides a step‑by‑step Go implementation that reads file metadata, validates and corrects owners and modes, includes full example code, and discusses integration tips and required privileges.

File PermissionsGoLinux
0 likes · 6 min read
How to Check and Fix Linux File Permissions with Go
Practical DevOps Architecture
Practical DevOps Architecture
Apr 18, 2024 · Cloud Native

Kubernetes Source Code Deep Dive and Secondary Development Course Outline

This curriculum provides a comprehensive, step‑by‑step exploration of Kubernetes internals—including kubeadm core source, Go module management, cobra libraries, kubeadm init/join processes, client‑go components, code generators, custom resources, operators, and practical deployment automation—aimed at mastering cluster setup, configuration, and advanced development.

Cluster ManagementGoclient-go
0 likes · 10 min read
Kubernetes Source Code Deep Dive and Secondary Development Course Outline
21CTO
21CTO
Apr 16, 2024 · Artificial Intelligence

Why Go Developers Are Turning to AI Despite Python Dominance

A 2024 survey of Go developers reveals strong interest in building AI applications but frustration over Python's dominant ecosystem, highlighting performance priorities, tooling gaps, and a desire for Go libraries comparable to Python's, while also showing cloud platform preferences and IDE usage trends.

Artificial IntelligenceGoPython
0 likes · 5 min read
Why Go Developers Are Turning to AI Despite Python Dominance
Ops Development & AI Practice
Ops Development & AI Practice
Apr 15, 2024 · Backend Development

Boost Go Performance with sync.Pool: Practical Guide and UML Modeling

This article explains how Go's sync.Pool can reduce memory allocations and garbage‑collection overhead in high‑performance applications, provides step‑by‑step usage examples, demonstrates a byte‑buffer pool, shows performance benefits, and visualizes the mechanism with UML class and sequence diagrams.

GoMemory Managementperformance optimization
0 likes · 7 min read
Boost Go Performance with sync.Pool: Practical Guide and UML Modeling
Ops Development & AI Practice
Ops Development & AI Practice
Apr 15, 2024 · Fundamentals

Mastering Go Concurrency: When to Use WaitGroup vs Mutex

This article examines Go's sync package, detailing how WaitGroup coordinates the completion of multiple goroutines while Mutex protects shared resources, compares their purposes and use cases, and provides practical code examples to help developers choose the right tool for concurrent programming.

GoGoroutineSynchronization
0 likes · 5 min read
Mastering Go Concurrency: When to Use WaitGroup vs Mutex
Ops Development & AI Practice
Ops Development & AI Practice
Apr 9, 2024 · Backend Development

Mastering Redis Client Integration in Go with the Adapter Pattern

Learn how to use the Adapter pattern in Go to unify disparate Redis clients—*redis.Client* and *redis.ClusterClient*—by defining a common interface, implementing concrete adapters, and employing a factory method, resulting in cleaner, maintainable code that adheres to the open/closed principle.

Adapter PatternDesign PatternsGo
0 likes · 7 min read
Mastering Redis Client Integration in Go with the Adapter Pattern
Yum! Tech Team
Yum! Tech Team
Apr 9, 2024 · Backend Development

Optimizing High‑Concurrency Menu Services with Go sync.Pool Object Pool

This article explains the principles of object pools, details the internal implementation of Go's sync.Pool, and demonstrates through benchmarks how using an object pool can dramatically reduce memory allocation and latency for high‑traffic menu services in a restaurant ordering application.

GoMemory Managementbenchmark
0 likes · 13 min read
Optimizing High‑Concurrency Menu Services with Go sync.Pool Object Pool
Ops Development & AI Practice
Ops Development & AI Practice
Apr 6, 2024 · Backend Development

How to Simulate Monkey Patching in Go Using Interfaces and Reflection

The article explains why Go does not support traditional monkey patching, then demonstrates two practical approaches—using interfaces with wrapper types and employing reflection—to extend a SimpleLogger with log levels without modifying its source, while discussing trade‑offs such as readability and performance.

Design PatternsGoInterface
0 likes · 6 min read
How to Simulate Monkey Patching in Go Using Interfaces and Reflection
Ops Development & AI Practice
Ops Development & AI Practice
Apr 5, 2024 · Backend Development

Unlocking Go’s log Package: Simple, Flexible, and Concurrency‑Safe Logging

This article explains the importance of logging, outlines the Go standard library log package’s design highlights—simplicity, flexibility, concurrency safety, and customizability—describes its core Logger structure, shows how mutexes ensure thread‑safe writes, and provides practical code examples with guidance on extending functionality.

BackendGoStandard Library
0 likes · 8 min read
Unlocking Go’s log Package: Simple, Flexible, and Concurrency‑Safe Logging
Ops Development & AI Practice
Ops Development & AI Practice
Apr 5, 2024 · Fundamentals

Master Go's Initialization: Variable, init, and main Execution Order

Understanding Go's initialization sequence—package-level variable setup, init function calls, and main execution—helps developers avoid circular dependencies, ensure correct startup order, and optimize launch time, especially when integrating third‑party libraries that run their own init logic before your code.

GoInitializationPackage Variables
0 likes · 7 min read
Master Go's Initialization: Variable, init, and main Execution Order
Ops Development & AI Practice
Ops Development & AI Practice
Apr 5, 2024 · Fundamentals

Mastering Go’s Context: Design Principles, Features, and Real‑World Usage

Go’s Context package provides a simple, standardized way to control goroutine lifecycles, enforce timeouts, cancel operations, and pass request-scoped values, embodying Go’s philosophy of clarity and efficiency; this article outlines its key characteristics, design philosophy, and demonstrates practical HTTP cancellation with code.

GoGoroutinecancellation
0 likes · 6 min read
Mastering Go’s Context: Design Principles, Features, and Real‑World Usage
Ops Development & AI Practice
Ops Development & AI Practice
Apr 4, 2024 · Fundamentals

Mastering the Facade Pattern in Go: Simplify Complex Systems

This article explains the Facade design pattern, outlines its core roles, provides step‑by‑step guidance for implementing it in Go, showcases a complete code example, and discusses its advantages and typical use cases such as API gateways in microservice architectures.

Code ExampleDesign PatternsFacade Pattern
0 likes · 5 min read
Mastering the Facade Pattern in Go: Simplify Complex Systems
Ops Development & AI Practice
Ops Development & AI Practice
Apr 2, 2024 · Backend Development

When to Use context.Background vs context.TODO in Go

The article explains the differences between Go's context.Background() and context.TODO() functions, describing how each creates an empty Context, when to use them as top‑level roots or temporary placeholders, and why proper selection improves code clarity and maintainability.

Goprogramming
0 likes · 3 min read
When to Use context.Background vs context.TODO in Go
Ops Development & AI Practice
Ops Development & AI Practice
Mar 27, 2024 · Backend Development

How to Choose the Right Redis PoolSize in Go for Optimal Performance

This article explains why correctly configuring the Redis client PoolSize in Go is crucial for performance and stability, outlines key factors such as concurrency, latency, and resource limits, and provides practical strategies, benchmarking methods, and sample code to help developers determine the optimal pool size.

Connection PoolGoredis
0 likes · 5 min read
How to Choose the Right Redis PoolSize in Go for Optimal Performance
Ops Development & AI Practice
Ops Development & AI Practice
Mar 22, 2024 · Backend Development

Mastering Go File Path Handling with strings.LastIndex

This article explains how to efficiently use Go's strings.LastIndex function to extract a directory from a file path, verify its existence, and create the parent directory when missing, providing a concise alternative to dedicated path libraries.

File PathGobackend-development
0 likes · 4 min read
Mastering Go File Path Handling with strings.LastIndex
Ops Development & AI Practice
Ops Development & AI Practice
Mar 22, 2024 · Databases

How to Use SQLite3 in Go: A Step‑by‑Step Guide

This guide walks you through installing the Go SQLite3 driver, opening a database connection, creating tables, inserting records, querying data, and provides a complete runnable example, helping developers integrate lightweight SQLite storage into Go applications efficiently.

GoSQLiteTutorial
0 likes · 6 min read
How to Use SQLite3 in Go: A Step‑by‑Step Guide
Alibaba Cloud Native
Alibaba Cloud Native
Mar 22, 2024 · Cloud Native

Implement Complex Canary Releases with MSE Cloud Native Gateway WASM Plugins

Learn how to use Alibaba Cloud's MSE Cloud Native Gateway WASM plugins to implement sophisticated full‑link canary releases, including custom header‑based routing, parameter‑driven traffic percentages, and multi‑condition rules, with step‑by‑step Go code, configuration examples, and compilation instructions.

GoMSEMicroservices
0 likes · 12 min read
Implement Complex Canary Releases with MSE Cloud Native Gateway WASM Plugins
Go Development Architecture Practice
Go Development Architecture Practice
Mar 21, 2024 · Backend Development

How to Process One Billion Rows in Go: 9 Optimized Solutions Under 4 Seconds

This article walks through nine Go‑based implementations for the 1‑Billion‑Row Challenge, starting from a straightforward scanner approach and progressively applying map pointer values, custom parsing, integer arithmetic, buffer tweaks, custom hash tables, and parallelism to shrink processing time from 1 minute 45 seconds to under 4 seconds.

1BRCGoParallelism
0 likes · 22 min read
How to Process One Billion Rows in Go: 9 Optimized Solutions Under 4 Seconds
php Courses
php Courses
Mar 21, 2024 · Backend Development

Comparing Go and PHP: Similarities, Differences, and Choosing the Right Language

This article examines the popular web development languages Go and PHP, outlining their shared traits such as general-purpose use, compilation, rich libraries, and active communities, while highlighting key differences in syntax, type systems, performance, and typical use cases to guide developers in selecting the most suitable language for their projects.

GoPHPWeb Development
0 likes · 5 min read
Comparing Go and PHP: Similarities, Differences, and Choosing the Right Language
FunTester
FunTester
Mar 20, 2024 · Fundamentals

Java vs Go Generics: Syntax, Constraints, and Practical Differences

This article compares Java and Go generics, explaining their syntax, type constraints, union types, variance, and practical code examples, while highlighting key differences such as explicit constraints in Go, Java’s type hierarchy, and the impact on type switches and type safety.

ComparisonGenericsGo
0 likes · 10 min read
Java vs Go Generics: Syntax, Constraints, and Practical Differences
37 Interactive Technology Team
37 Interactive Technology Team
Mar 18, 2024 · Databases

Handling MySQL Read‑Only Errors During Master‑Slave Switch in Go: Extending the Driver and Using rejectReadOnly

When a MySQL master‑slave switch makes the old master read-only, Go connection pools keep reusing stale connections and cause prolonged write errors, but by extending the driver to return driver.ErrBadConn on error 1290 or using the DSN flag rejectReadOnly=true, the bad connections are discarded and the error disappears almost instantly.

ConnectionPoolDatabaseSwitchDriverExtension
0 likes · 14 min read
Handling MySQL Read‑Only Errors During Master‑Slave Switch in Go: Extending the Driver and Using rejectReadOnly
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Mar 17, 2024 · Fundamentals

Implementing Log Snapshotting in Raft: A Step‑by‑Step Guide

This article provides a comprehensive tutorial on adding log snapshotting (snapshotting) to a Raft‑based distributed key‑value store, explaining the motivation, the snapshot mechanism, and detailed Go code for generating, transferring, applying, and persisting snapshots to reduce log size and improve performance.

ConsensusDistributed SystemsGo
0 likes · 15 min read
Implementing Log Snapshotting in Raft: A Step‑by‑Step Guide
MaGe Linux Operations
MaGe Linux Operations
Mar 14, 2024 · Backend Development

Mastering Go Error Handling: Panic, Recover, and Best Practices

This article explains Go's error handling conventions, the built‑in error interface, how to use panic and recover for runtime exceptions, and presents practical patterns—including closure‑based handling and custom package guidelines—to write robust backend code.

Error HandlingGopanic
0 likes · 12 min read
Mastering Go Error Handling: Panic, Recover, and Best Practices
Go Development Architecture Practice
Go Development Architecture Practice
Mar 14, 2024 · Backend Development

Top Go Packages Every Developer Should Know: Config, CLI, Web, and More

This article compiles a comprehensive list of widely used Go third‑party packages covering configuration handling, command‑line interfaces, environment variables, automation, dynamic recompilation, web frameworks, date management, ORM, microservices, web crawling, retry logic, server restarts, scheduling, and database clients, each with brief features and repository links.

BackendConfigurationGo
0 likes · 7 min read
Top Go Packages Every Developer Should Know: Config, CLI, Web, and More
Architect
Architect
Mar 10, 2024 · Backend Development

Build a Redis Distributed Lock in Go from Scratch

This article walks through the problem of implementing a reliable Redis distributed lock in Go, explains the pitfalls of naive SetNx usage, introduces timeout handling and GetSet replacement, provides step‑by‑step Go code, and demonstrates its correctness with a multithreaded test.

Gobackend-developmentconcurrency
0 likes · 11 min read
Build a Redis Distributed Lock in Go from Scratch
MaGe Linux Operations
MaGe Linux Operations
Mar 10, 2024 · Backend Development

Mastering RPC: From Concepts to gRPC Implementation in Go

This article explains the fundamentals of Remote Procedure Call (RPC), its historical origins, the step‑by‑step execution process, and provides a practical guide to installing and using gRPC with Protocol Buffers in Go, including full code examples and advantages.

GoMicroservicesProtocol Buffers
0 likes · 14 min read
Mastering RPC: From Concepts to gRPC Implementation in Go
Su San Talks Tech
Su San Talks Tech
Mar 10, 2024 · Backend Development

Why fasthttp Outperforms net/http: Inside Go’s Ultra‑Fast Server

This article compares Go’s standard net/http library with the high‑performance fasthttp server, detailing their request‑handling workflows, explaining fasthttp’s optimizations such as connection reuse, sync.Pool and unsafe.Pointer conversions, and walking through core code structures like workerPool, workerChan, and the Serve routine.

BackendGofasthttp
0 likes · 16 min read
Why fasthttp Outperforms net/http: Inside Go’s Ultra‑Fast Server
MaGe Linux Operations
MaGe Linux Operations
Mar 9, 2024 · Backend Development

Mastering Go Socket Programming: From TCP/UDP to HTTP Clients

This article explains Go’s socket programming model, covering the classic five‑step workflow, the versatile net.Dial function, and practical code examples for ICMP, TCP, and HTTP client operations, helping developers build networked applications efficiently.

Code ExamplesGoHTTP
0 likes · 10 min read
Mastering Go Socket Programming: From TCP/UDP to HTTP Clients
Ops Development & AI Practice
Ops Development & AI Practice
Mar 4, 2024 · Backend Development

Why os.Rename Fails Across Devices in Go and How to Fix It

This article explains why Go's os.Rename throws an "invalid cross-device link" error when moving files between different file systems and shows how to replace it with io.Copy for reliable cross‑device file transfers, including code examples and related filesystem concepts.

Gocross-devicefile-handling
0 likes · 5 min read
Why os.Rename Fails Across Devices in Go and How to Fix It
Ops Development & AI Practice
Ops Development & AI Practice
Mar 1, 2024 · Backend Development

Master Go Reflection: Read and Modify Struct Fields at Runtime

This article explains Go's powerful reflection feature, walks through importing the reflect package, outlines the step‑by‑step process to obtain Type and Value objects, and provides complete code examples that read, modify, and display struct fields while noting performance considerations.

GoReflectionprogramming
0 likes · 5 min read
Master Go Reflection: Read and Modify Struct Fields at Runtime
Practical DevOps Architecture
Practical DevOps Architecture
Mar 1, 2024 · Cloud Native

Kubernetes Advanced Development Resource Collection

This article provides a comprehensive, English-translated list of 78 PDF resources covering Kubernetes advanced development topics such as CKAD exam updates, kubeadm source analysis, Go module management, client‑go libraries, custom controller creation, and API usage, organized into three progressive sections.

Advanced DevelopmentCloud NativeDevOps
0 likes · 8 min read
Kubernetes Advanced Development Resource Collection
Architecture Digest
Architecture Digest
Feb 28, 2024 · Fundamentals

Go Language Enters Top 10 in the TIOBE Index (February 2024) and Its Main Application Areas

The February 2024 TIOBE Index shows Go climbing to its highest ever position at #8, highlighting its design goals, historical ranking fluctuations, and widespread use in backend services, cloud computing, container technologies, networking, tooling, databases, and IoT, while also presenting the full top‑10 language list and related charts.

GoProgramming Language RankingsTIOBE Index
0 likes · 7 min read
Go Language Enters Top 10 in the TIOBE Index (February 2024) and Its Main Application Areas
Ops Development & AI Practice
Ops Development & AI Practice
Feb 27, 2024 · Information Security

How to Parse PKCS#1 and PKCS#8 PEM Private Keys in Go

This guide explains the differences between PKCS#1 and PKCS#8 PEM private key formats, shows how to identify the format by inspecting the PEM header, and provides step‑by‑step Go code using x509.ParsePKCS1PrivateKey or x509.ParsePKCS8PrivateKey to correctly decode and use the key.

GoPEMPKCS1
0 likes · 4 min read
How to Parse PKCS#1 and PKCS#8 PEM Private Keys in Go
Java Architect Essentials
Java Architect Essentials
Feb 25, 2024 · Backend Development

Designing a High‑Concurrency Ticket‑Seckill System: Architecture, Load Balancing, and Go Implementation

The article analyzes the extreme‑traffic challenges of the 12306 ticket‑seckill service, presents a layered load‑balancing architecture, compares inventory‑deduction strategies, and demonstrates a complete Go‑based prototype with Nginx weighted round‑robin, Redis stock management, and ApacheBench performance testing.

Distributed SystemsGoNginx
0 likes · 19 min read
Designing a High‑Concurrency Ticket‑Seckill System: Architecture, Load Balancing, and Go Implementation
Ops Development & AI Practice
Ops Development & AI Practice
Feb 24, 2024 · Information Security

How the IPAddresses Field in Go’s x509.Certificate Enhances Certificate Security

This article explains the purpose of the IPAddresses field in Go's crypto/x509 Certificate struct, outlines its security benefits and deployment scenarios, discusses limitations such as dynamic IP environments, and provides a practical code example for correctly configuring IP address restrictions in certificates.

Certificate SecurityGoIPAddresses
0 likes · 5 min read
How the IPAddresses Field in Go’s x509.Certificate Enhances Certificate Security
Ops Development & AI Practice
Ops Development & AI Practice
Feb 23, 2024 · Backend Development

Essential Go Interview Questions for Junior, Mid‑Level, and Senior Developers

A comprehensive collection of Go interview questions organized by junior, mid‑level, and senior levels helps assess candidates' understanding of language fundamentals, concurrency, performance optimization, architecture, and advanced features, enabling more accurate hiring decisions for Go development teams.

Gobackend-developmentinterview-questions
0 likes · 12 min read
Essential Go Interview Questions for Junior, Mid‑Level, and Senior Developers
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Feb 21, 2024 · Backend Development

Recreating the Spring Festival Gala Magic Trick Using Go

This article walks through a step‑by‑step Go implementation of the popular Spring Festival Gala magic trick, explaining the underlying Josephus‑style algorithm, showing each transformation of a slice of cards with complete code snippets, and demonstrating how the final single card matches the hidden one.

GoJosephus problemMagic Trick
0 likes · 9 min read
Recreating the Spring Festival Gala Magic Trick Using Go
Bilibili Tech
Bilibili Tech
Feb 20, 2024 · Backend Development

Investigation and Optimization of Unexpected AAAA DNS Requests in Go Applications

The article investigates why Go applications unexpectedly send AAAA DNS queries to a secondary nameserver, tracing the issue to the built‑in resolver’s handling of non‑recursive responses from a NetScaler proxy, and recommends using the cgo resolver, enabling recursion, or forcing IPv4 to eliminate the added latency.

DNSGoIPv4
0 likes · 14 min read
Investigation and Optimization of Unexpected AAAA DNS Requests in Go Applications
Go Programming World
Go Programming World
Feb 19, 2024 · Backend Development

Implementing Context Managers in Go: Emulating Python's with Using defer and Anonymous Functions

This article explores how to replicate Python's context manager behavior in Go by examining defer's delayed execution, demonstrating its limitations in loops, and presenting three solutions—anonymous functions, a WithClose helper, and a withLock-inspired pattern—to ensure timely resource release.

GoResource ManagementWithClose
0 likes · 10 min read
Implementing Context Managers in Go: Emulating Python's with Using defer and Anonymous Functions
AI Illustrated Series
AI Illustrated Series
Feb 13, 2024 · Backend Development

Which Go Web Framework Reigns Supreme? A Deep Comparative Analysis

This article systematically compares the most popular Go web frameworks—Beego, Buffalo, Echo, Gin, Iris, and Revel—by evaluating their popularity, learning curve, routing capabilities, middleware ecosystems, server features, session handling, template engines, testing support, and other core functionalities, complete with concrete code examples.

BackendComparisonGo
0 likes · 14 min read
Which Go Web Framework Reigns Supreme? A Deep Comparative Analysis