go copy to array

package main

import (
    "fmt"
)

func main() {
    // Source slice
    source := []int{1, 2, 3, 4, 5}

    // Destination array
    var destination [5]int

    // Using copy function to copy elements from source to destination
    copy(destination[:], source)

    // Printing the destination array
    fmt.Println("Destination Array:", destination)
}