Last active 1686081276

Revision c528d28b98e7457c97458b6c289d1635f90139a8

yo.go Raw
1package main
2
3import "fmt"
4
5type Person struct {
6 Name string
7 Age int
8 Country string
9}
10
11func main() {
12 // Create a new instance of the Person struct
13 p := Person{
14 Name: "John",
15 Age: 30,
16 Country: "USA",
17 }
18
19 // Access and print the fields of the Person struct
20 fmt.Println("Name:", p.Name)
21 fmt.Println("Age:", p.Age)
22 fmt.Println("Country:", p.Country)
23}