How to copy map in Go? Technology Community › Category: Golang › How to copy map in Go? 0 Vote Up Vote Down VietMX Staff asked 4 years ago You copy a map by traversing its keys. Unfortunately, this is the simplest way to copy a map in Go: a := map[string]bool{"A": true, "B": true} b := make(map[string]bool) for key, value := range a { b[key] = value }