---
title: "Discussion on \"Preventing goroutine leaks\" | Hashnode"
description: "Discussion on \"Preventing goroutine leaks\". The done Channel Pattern\nfunc doWork(done <-chan interface{}) <-chan interface{} {\n    terminated := make(chan interface{})\n    go func() {\n        defer close(terminated)\n        for {\n            select {\n            case s := <-strings:\n          ..."
url: "https://hashnode.com/posts/preventing-goroutine-leaks/6864c34ebf13f5e53a3019b7"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Preventing goroutine leaks](https://tigerabrodi.blog/preventing-goroutine-leaks?utm_source=hashnode&utm_medium=feed)

The done Channel Pattern func doWork(done <-chan interface{}) <-chan interface{} { terminated := make(chan interface{}) go func() { defer close(terminated) for { select { case s := <-strings: ...

Jul 2, 2025 · 1 min read · tigerabrodi.blog  
Read the article

-   [#go](https://hashnode.com/tag/go)

## Written by

[Tiger Abrodi](https://hashnode.com/@tigerabrodi)

@tigerabrodi · Germany

  
[View profile](https://hashnode.com/@tigerabrodi)

Obsessed with crafting software.

Just a guy who loves to write code and watch anime.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
