Naposledy aktivní 1686081276

jarrodb revidoval tento gist 1686081276. Přejít na revizi

1 file changed, 23 insertions

yo.go(vytvořil soubor)

@@ -0,0 +1,23 @@
1 + package main
2 +
3 + import "fmt"
4 +
5 + type Person struct {
6 + Name string
7 + Age int
8 + Country string
9 + }
10 +
11 + func 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 + }
Novější Starší