Fix

"race condition detected" by Go Race Detector

Enable the Go Race Detector by running tests or builds with the -race flag to identify and fix concurrent memory access issues.

Run your tests or build with the -race flag to enable the Go Race Detector, which will identify concurrent access to the same memory location without proper synchronization.

go test -race ./...

The output will show the file, line number, and goroutine IDs involved in the race, allowing you to add mutexes or channels to protect the shared data.