Mutex locking in Go allows you to ensure that only one goroutine at a time has a lock:
import "sync"
func mutexTest() {
lock := sync.Mutex{}
go func(m *sync.Mutex) {
m.Lock()
defer m.Unlock() // Automatically unlock when this function returns
// D...