Go doesn’t offer the same sort of guarantees as Rust does, but the goroutine/channel model nudges you towards a safe style
Go is memory safe for purely sequential code. It's not memory safe to share memory-write access among multiple Go threads. Using CSP idioms only, via Go channels, can preserve memory safety, but is prone to more general race conditions.
Although better, Rust can only protect against races coming from threads accessing in-memory resources.
For races related to external resources, or caused by misuse of OS IPC mechanisms (which is the future thanks Spectre), it offers as much protection as any other language.
Re:Zero to Production in Rust
by steveklabnik on Saturday June 05, 2021 @01:05PM
(#27406734)
Go does runtime instrumentation to detect data races, rather than compile time checks.
Does Go offer similar guarantees for concurrency?