<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
<channel>
  <title>Mahib&apos;s Margins</title>
  <link>https://mahibulhaque.me</link>
  <description>Recent content on Mahib&apos;s Margins</description>
  <language>en</language>
<item>
  <title>Supervised fire-and-forget in Go</title>
  <link>https://mahibulhaque.me/blog/go/supervised-fire-and-forget/</link>
  <guid>https://mahibulhaque.me/blog/go/supervised-fire-and-forget/</guid>
  <pubDate>Sat, 25 Jul 2026 00:00:00 GMT</pubDate>
  <description>A bounded worker pool for small background tasks, with task-owned contexts, panic recovery, and graceful shutdown.</description>
</item>
<item>
  <title>Modernizers &amp; go fix</title>
  <link>https://mahibulhaque.me/blog/go/gofix/</link>
  <guid>https://mahibulhaque.me/blog/go/gofix/</guid>
  <pubDate>Sat, 04 Jul 2026 00:00:00 GMT</pubDate>
  <description>Go 1.26 rebuilt go fix on the analysis framework. It modernizes your code and respects the Go version your module declares. The post covers the modernizers, the bigger x/tools suite, and what //go:fix inline can and can&apos;t migrate.</description>
</item>
<item>
  <title>Peeking into Go struct tags</title>
  <link>https://mahibulhaque.me/blog/go/struct-tags/</link>
  <guid>https://mahibulhaque.me/blog/go/struct-tags/</guid>
  <pubDate>Sat, 18 Apr 2026 00:00:00 GMT</pubDate>
  <description>A quick tour of Go struct tags: how different libraries use them, how you read them at runtime with reflection, and how other tools read them at build time instead.</description>
</item>
<item>
  <title>What canceled my Go context?</title>
  <link>https://mahibulhaque.me/blog/go/context-cancellation-cause/</link>
  <guid>https://mahibulhaque.me/blog/go/context-cancellation-cause/</guid>
  <pubDate>Tue, 24 Feb 2026 00:00:00 GMT</pubDate>
  <description>How Go 1.20&apos;s WithCancelCause and Go 1.21&apos;s WithTimeoutCause let you attach a reason to context cancellation, plus a gotcha with manual cancel and the stdlib pattern that covers every path.</description>
</item>
<item>
  <title>Revisiting interface segregation in Go</title>
  <link>https://mahibulhaque.me/blog/go/interface-segregation/</link>
  <guid>https://mahibulhaque.me/blog/go/interface-segregation/</guid>
  <pubDate>Sat, 01 Nov 2025 00:00:00 GMT</pubDate>
  <description>Apply SOLID&apos;s Interface Segregation Principle in Go with consumer-defined contracts. Learn why small interfaces and implicit implementation matter.</description>
</item>
<item>
  <title>Let the domain guide your application structure</title>
  <link>https://mahibulhaque.me/blog/go/app-structure/</link>
  <guid>https://mahibulhaque.me/blog/go/app-structure/</guid>
  <pubDate>Sat, 20 Sep 2025 00:00:00 GMT</pubDate>
  <description>Organize Go apps by domain, not technology. Learn why models/controllers structure hurts and how bounded contexts create better separation.</description>
</item>
<item>
  <title>Early return and goroutine leak</title>
  <link>https://mahibulhaque.me/blog/go/early-return-and-goroutine-leak/</link>
  <guid>https://mahibulhaque.me/blog/go/early-return-and-goroutine-leak/</guid>
  <pubDate>Sun, 07 Sep 2025 00:00:00 GMT</pubDate>
  <description>Prevent goroutine leaks caused by early returns with unbuffered channels. Learn buffering, draining, errgroup patterns, and goleak testing.</description>
</item>
<item>
  <title>Gateway pattern for external service calls</title>
  <link>https://mahibulhaque.me/blog/go/gateway-pattern/</link>
  <guid>https://mahibulhaque.me/blog/go/gateway-pattern/</guid>
  <pubDate>Sun, 03 Aug 2025 00:00:00 GMT</pubDate>
  <description>Separate business logic from external service calls using the Gateway pattern. Apply dependency inversion and interface segregation in Go.</description>
</item>
<item>
  <title>Why does Go&apos;s io.Reader have such a weird signature?</title>
  <link>https://mahibulhaque.me/blog/go/io-reader-signature/</link>
  <guid>https://mahibulhaque.me/blog/go/io-reader-signature/</guid>
  <pubDate>Sat, 08 Feb 2025 00:00:00 GMT</pubDate>
  <description>Understand why io.Reader takes a byte slice parameter instead of returning one. Learn about heap allocations and buffer reuse in Go streams.</description>
</item>
<item>
  <title>Behind the blog</title>
  <link>https://mahibulhaque.me/blog/misc/behind-the-blog/</link>
  <guid>https://mahibulhaque.me/blog/misc/behind-the-blog/</guid>
  <pubDate>Tue, 15 Oct 2024 00:00:00 GMT</pubDate>
  <description>How Mahib&apos;s Margins is built with Astro, Markdown, React, Tailwind CSS, GitHub Actions, GitHub Pages, Cloudflare, and R2.</description>
</item>
<item>
  <title>Writing a circuit breaker in Go</title>
  <link>https://mahibulhaque.me/blog/go/circuit-breaker/</link>
  <guid>https://mahibulhaque.me/blog/go/circuit-breaker/</guid>
  <pubDate>Sun, 06 Oct 2024 00:00:00 GMT</pubDate>
  <description>Build a production-ready circuit breaker in Go from scratch with closed, open, and half-open states to prevent cascading failures.</description>
</item>
<item>
  <title>Dysfunctional options pattern in Go</title>
  <link>https://mahibulhaque.me/blog/go/dysfunctional-options-pattern/</link>
  <guid>https://mahibulhaque.me/blog/go/dysfunctional-options-pattern/</guid>
  <pubDate>Wed, 06 Mar 2024 00:00:00 GMT</pubDate>
  <description>Discover a simpler alternative to functional options: method chaining with builder-style configuration that&apos;s 76x faster and easier to understand.</description>
</item>
<item>
  <title>Configuring options in Go</title>
  <link>https://mahibulhaque.me/blog/go/configure-options/</link>
  <guid>https://mahibulhaque.me/blog/go/configure-options/</guid>
  <pubDate>Tue, 05 Sep 2023 00:00:00 GMT</pubDate>
  <description>Compare three Go option patterns: exposed structs, option constructors, and functional options. Learn when to use each for clean APIs.</description>
</item>
<item>
  <title>Limit goroutines with buffered channels</title>
  <link>https://mahibulhaque.me/blog/go/limit-goroutines-with-buffered-channels/</link>
  <guid>https://mahibulhaque.me/blog/go/limit-goroutines-with-buffered-channels/</guid>
  <pubDate>Wed, 23 Aug 2023 00:00:00 GMT</pubDate>
  <description>Control goroutine concurrency with buffered channels as semaphores. Prevent resource exhaustion with backpressure patterns in Go workers.</description>
</item>
<item>
  <title>Interface guards in Go</title>
  <link>https://mahibulhaque.me/blog/go/interface-guards/</link>
  <guid>https://mahibulhaque.me/blog/go/interface-guards/</guid>
  <pubDate>Fri, 18 Aug 2023 00:00:00 GMT</pubDate>
  <description>Use compile-time interface guards to verify type conformity in Go without runtime overhead. Learn the var _ Interface = (*Type)(nil) pattern.</description>
</item>
<item>
  <title>Go structured logging with slog</title>
  <link>https://mahibulhaque.me/blog/go/structured-logging-with-slog/</link>
  <guid>https://mahibulhaque.me/blog/go/structured-logging-with-slog/</guid>
  <pubDate>Thu, 10 Aug 2023 00:00:00 GMT</pubDate>
  <description>Master Go 1.21&apos;s log/slog package for structured logging with levels, JSON output, and attribute grouping. No third-party libraries needed.</description>
</item>
</channel>
</rss>