Tagged articles

Go

1930 articles · Page 10 of 20
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.

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

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

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

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

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

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

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

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

GoMiddlewareModular Design
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 SecurityGoMySQL
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.

Code styleGoProgramming Fundamentals
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.

DevOpsGoRemote Config
0 likes · 22 min read
Comprehensive Guide to Using Viper for Go Application Configuration
Nullbody Notes
Nullbody Notes
May 2, 2024 · Backend Development

Building an Asynchronous Queue in Go: Design, Demo, and Benchmark

This article explains why high‑concurrency systems need an asynchronous queue, walks through a producer‑consumer design implemented with Go and Gin, shows a complete code demo with configurable workers and capacity, and provides benchmark instructions to evaluate its performance.

EasyQueueGinGo
0 likes · 13 min read
Building an Asynchronous Queue in Go: Design, Demo, and Benchmark
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.

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

GoProgramming Fundamentalsconditional statements
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.

Goempty interfacegeneric programming
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.

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 StructuresGogenerics
0 likes · 7 min read
Mastering Go Generics: Real-World Examples and Practical Insights
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.

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

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

Gobackend developmentconfiguration management
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 PatternsGoMonkey Patching
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.

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

Gocancellationconcurrency
0 likes · 6 min read
Mastering Go’s Context: Design Principles, Features, and Real‑World Usage