Tagged articles

time.After

2 articles · Page 1 of 1
Golang Shines
Golang Shines
Feb 15, 2026 · Fundamentals

8 Subtle Go Language Details You Might Not Know

This article walks through eight often‑overlooked Go language nuances—ranging from direct integer iteration and generic type constraints to UTF‑8 string length, nil interface pitfalls, safe nil method calls, time.After resource leaks, empty‑struct semaphores, and JSON field omission—showing concrete code examples, common mistakes, and recommended practices.

GoUTF-8empty struct
0 likes · 9 min read
8 Subtle Go Language Details You Might Not Know
Ops Development & AI Practice
Ops Development & AI Practice
Apr 19, 2024 · Backend Development

How to Add a Timeout to an Infinite Loop in Go

This guide shows how to protect a long‑running Go function that checks a RabbitMQ cluster by using time.After and a select statement to automatically stop the infinite loop after a configurable timeout, improving robustness and maintainability.

backendgolanginfinite loop
0 likes · 5 min read
How to Add a Timeout to an Infinite Loop in Go