if I am creating a go routine in my code, how do I write a test case that tests whether a goroutine is being created.
how do I write a test case that tests whether a goroutine is being created
This is never what you're looking for. Instead you should instrument your test to check that whatever the go routine is supposed to do actually happens.