package main

import (
	"fmt"
	"maps"
)

func main() {
	// section: example
	src := map[string]int{
		"Alice":   25,
		"Bob":     30,
		"Charlie": 35,
	}

	dst := map[string]int{
		"Bob":  99, // This will be overwritten
		"Eve": 28,  // This will remain
	}

	fmt.Println("Before copy:")
	fmt.Println("  Source:     ", src)
	fmt.Println("  Destination:", dst)

	// Copy all key-value pairs from src to dst
	maps.Copy(dst, src)

	fmt.Println("\nAfter copy:")
	fmt.Println("  Source:     ", src)
	fmt.Println("  Destination:", dst)
	// section: example
}
