Tagged articles
1631 articles
Page 8 of 17
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
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.

BenchmarkGoHigh‑Performance Networking
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.

Backend DevelopmentConcurrencyConnection Pool
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.

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

GoLinuxfile-permissions
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 IntelligenceGoPerformance
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.

GoPerformance Optimizationmemory management
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.

ConcurrencyGoGoroutine
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 PatternBackend DevelopmentDesign Patterns
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.

BenchmarkGoPerformance
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 7, 2024 · Backend Development

Mastering Configuration Management in Go with Viper and YAML

This guide explains how to use the Viper library together with YAML files to efficiently manage application configuration in Go, covering installation, basic usage, handling complex list structures, and best practices for maintainable and secure config handling.

Backend DevelopmentConfiguration ManagementGo
0 likes · 7 min read
Mastering Configuration Management in Go with Viper and YAML
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.

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

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

Backend DevelopmentFile PathGo
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.

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

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

1BRCBenchmarkData Processing
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.

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

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

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

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

Backend DevelopmentGoProtocol 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 DevelopmentDevOpsGo
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.

Backend DevelopmentCloud ComputingGo
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 SystemsGohigh concurrency
0 likes · 19 min read
Designing a High‑Concurrency Ticket‑Seckill System: Architecture, Load Balancing, and Go Implementation