// Decrement the wait group count so the program knows this // has been completed once the goroutine exits. defer waitGroup.Done() // Request a socket connection from the session to process our query. // Close the session when the goroutine exits and put the connection back // into the pool. sessionCopy := mongoSession.Copy() defer sessionCopy.Close()