Tagged articles

defer

18 articles · Page 1 of 1
Golang Shines
Golang Shines
Aug 13, 2026 · Backend Development

Why Interviewers Favor These 5 Go Questions—and How to Ace Them

This article breaks down the five Go interview questions interviewers love, explains the underlying concepts such as goroutine and channel mechanics, empty‑interface pitfalls, map concurrency, defer execution, and Go modules, provides high‑scoring code examples, and offers concrete preparation tips to showcase engineering thinking and practical skills.

GoInterviewconcurrency
0 likes · 9 min read
Why Interviewers Favor These 5 Go Questions—and How to Ace Them
Golang Shines
Golang Shines
Jul 28, 2026 · Backend Development

Why Go’s Error Handling Isn’t Mystical: A Beginner‑Friendly Guide

The article explains Go’s philosophy of treating errors as ordinary return values, contrasts it with try‑catch in other languages, illustrates three error scenarios (error, panic, recover) with food‑delivery analogies, provides concrete code examples, and outlines best practices and common pitfalls for safe error handling in Go.

Godefererror handling
0 likes · 11 min read
Why Go’s Error Handling Isn’t Mystical: A Beginner‑Friendly Guide
Golang Shines
Golang Shines
Jul 3, 2026 · Backend Development

Top Go Interview Questions: defer, GMP Scheduler, Slice Internals, Channels, and Context

This article presents a curated collection of 30 essential Go interview questions covering language characteristics, object‑orientation, inheritance, polymorphism, goroutine basics, channel usage, defer execution order, memory allocation, slice vs array, map safety, error handling, context, Go modules, the GMP scheduler, and practical code examples for testing and middleware.

GoInterview Questionschannel
0 likes · 11 min read
Top Go Interview Questions: defer, GMP Scheduler, Slice Internals, Channels, and Context
Golang Shines
Golang Shines
May 8, 2026 · Fundamentals

Deep Dive into Go’s Core Mechanisms: Pointers, defer, Polymorphism, and Empty Interface in Practice

This article systematically explores Go's most confusing features—including pointer semantics, defer execution order, lightweight object‑oriented patterns via struct embedding, interface‑based polymorphism, and the empty interface with type assertions—through over twenty runnable code snippets that reveal the underlying design principles.

Godeferempty interface
0 likes · 17 min read
Deep Dive into Go’s Core Mechanisms: Pointers, defer, Polymorphism, and Empty Interface in Practice
21CTO
21CTO
Sep 19, 2025 · Backend Development

Why Go’s Error Handling, Defer, and Nil Design Feel Like Bad Ideas

The article critiques Go’s language design by highlighting unnecessary patterns such as overly broad error‑variable scopes, confusing nil semantics, cumbersome defer usage, hidden memory costs, and a lack of clear ownership, illustrating each point with concrete code examples and comparing alternatives in other languages.

defererror handlinglanguage-design
0 likes · 11 min read
Why Go’s Error Handling, Defer, and Nil Design Feel Like Bad Ideas
FunTester
FunTester
Mar 13, 2025 · Backend Development

When to Use Value vs Pointer Receivers and Other Go Pitfalls You Must Avoid

This article examines common Go mistakes—including choosing between value and pointer receivers, misusing unnamed or named return values, returning nil interfaces, passing filenames instead of readers, and defer parameter evaluation—provides clear explanations, real‑world examples, and best‑practice recommendations to write more reliable Go code.

Gobest practicesdefer
0 likes · 18 min read
When to Use Value vs Pointer Receivers and Other Go Pitfalls You Must Avoid
Subtle Storm
Subtle Storm
Feb 11, 2025 · Backend Development

Understanding Go's defer: Purpose, Design Philosophy, and Best Practices

This article explains Go's defer keyword, covering its purpose, LIFO execution, design goals for simplifying resource management and error handling, internal implementation details, common use cases like cleanup and logging, and performance considerations with practical code examples.

Godefererror handling
0 likes · 9 min read
Understanding Go's defer: Purpose, Design Philosophy, and Best Practices
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.

GoWithCloseanonymous function
0 likes · 10 min read
Implementing Context Managers in Go: Emulating Python's with Using defer and Anonymous Functions
Python Crawling & Data Mining
Python Crawling & Data Mining
Nov 9, 2020 · Fundamentals

Master Go Functions: Scope, Defer, Panic & Recover Explained

This article delves into advanced Go function concepts, illustrating memory allocation diagrams, variable scopes, the use of const for globals, the behavior of defer statements, and handling errors with panic and recover, complete with code examples and visual outputs to deepen your understanding.

GoVariable Scopeconst
0 likes · 8 min read
Master Go Functions: Scope, Defer, Panic & Recover Explained
360 Tech Engineering
360 Tech Engineering
Apr 13, 2020 · Backend Development

Understanding Exception and Error Handling in Go

This article explains how Go handles exceptions and errors using defer, panic, and recover, compares it with try‑catch in other languages, demonstrates the built‑in error interface, custom error types, and provides multiple code examples and analyses of their output.

ExceptionGodefer
0 likes · 6 min read
Understanding Exception and Error Handling in Go