---
title: "Discussion on \"Test in Go: the order of Cleanup is not what you think\" | Hashnode"
description: "Discussion on \"Test in Go: the order of Cleanup is not what you think\". Cleanup functions are not executed in the expected order"
url: "https://hashnode.com/posts/test-in-go-the-order-of-cleanup-is-not-what-you-think/65c9888739e30fedbe24133a"
---

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

Discussion

# [Test in Go: the order of Cleanup is not what you think](https://xuanyu.ca/test-in-go-the-order-of-cleanup-is-not-what-you-think?utm_source=hashnode&utm_medium=feed)

Cleanup functions are not executed in the expected order

Feb 12, 2024 · 3 min read · xuanyu.ca  
Read the article

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

## Written by

[Xuanyu Wang](https://hashnode.com/@xuanyu)

@xuanyu · Toronto, Canada

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

Fullstack web developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
