golang

package main

import "fmt"

// Define a struct named "Person" with two fields: Name and Age.
type Person struct {
    Name string
    Age  int
}

func main() {
    // Create a new instance of the Person struct and initialize its fields.
    person := Person{Name: "John Doe", Age: 30}

    // Call the printPerson function with the created person instance.
    printPerson(person)
}

// Define a function named "printPerson" that takes a Person as a parameter and prints its details.
func printPerson(p Person) {
    // Print the Name and Age of the Person using the fmt package.
    fmt.Printf("Name: %s, Age: %d\n", p.Name, p.Age)
}