The following is missed by the race detector
var (
a = "hi"
c = make(chan struct{})
)
func f() {
a = "bye"
close(c)
}
func main() {
go f()
fmt.Println(a)
// fmt.Printf(a)
<-c
}
But changing the fmt call to fmt.Printf where the a value is copied into the format string triggers a race