Get unlimited access
Open in app
Home
Notifications
Lists
Stories

Write
Aman Garg
Aman Garg

Aug 15, 2021

·
1 min read
Why use TestMain for testing in Go?
644
7

João Henrique Machado Silva

Another usecase of TestMain is to verify there are no goroutine leaks at the end of all tests. This can help detect resource leaks at a package level.

https://github.com/uber-go/goleak

--

--

More from Aman Garg

Love podcasts or audiobooks? Learn on the go with our new app.

Try Knowable

AboutHelpTermsPrivacy


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Aman Garg

Aman Garg

More from Medium

Ardi Avicenna

Ardi Avicenna

ESP32 Project #6 Serial Communication

Kaelyn Cassidy

Kaelyn Cassidy

The Intern Diaries: Smitten with Spring

Dipruv

Dipruv

CVX Whale Behavior

PSU RULE ~ Ag Division

PSU RULE ~ Ag Division

Friday On The Farm ~ 2/25/2022

Help

Status

Writers

Blog

Careers

Privacy

Terms

About

Knowable