Dancing with Go's Mutexes
medium.com
medium.com
The fact that your struct be concurrency-safe through mutex is an implementation detail. You want to keep the locking/unlocking internal to your type, you don't want to expose it to outsiders. Exporting the methods of the mutex in your struct suggests that somehow, it's ok for users of the type to lock/unlock it. I doubt that this is true. In practice, if your struct is "concurrency-safe", it means using its methods is sufficient to obtain a safe behavior. If a user of the type never requires access to the mutex, don't export it. Especially since mutexes aren't reentrant, in most case if a user of your struct attempted to Lock the struct before calling a method, they'd deadlock themselves.
TL;DR: for API design reasons, don't embed a mutex in your struct.
type MyType struct {
sync.Mutex // embedded/anonymous
mu sync.Mutex // not embedded
}
So AYBABTME's advice is to give the mutex a name.