Tagged articles
3 articles
Page 1 of 1
Golang Shines
Golang Shines
Mar 2, 2026 · Fundamentals

How to Use Conditional Compilation and Build Tags in Go

The article explains Go's conditional compilation mechanisms, covering file‑name suffixes, //go:build tags, practical cross‑platform examples, a zero‑overhead logging demo, and guidance on choosing the appropriate method for maintainable code.

GoLoggingbuild tags
0 likes · 12 min read
How to Use Conditional Compilation and Build Tags in Go
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.

BackendDependency InjectionGo
0 likes · 23 min read
Using Wire for Dependency Injection in Go Web Applications: A Practical Guide
Tencent Cloud Developer
Tencent Cloud Developer
Jan 17, 2022 · Backend Development

Applying Clean Architecture, Dependency Injection, and Testing in a Go Backend Project

The article demonstrates how to structure a Go backend using Clean Architecture’s four‑layer model, interface‑driven design, and compile‑time dependency injection with Google Wire, providing concrete examples of repository, service, and API implementations and unit‑testing each layer with sqlmock, gomock, and httptest.

Backend DevelopmentGotesting
0 likes · 17 min read
Applying Clean Architecture, Dependency Injection, and Testing in a Go Backend Project