diff --git a/examples/struct.txt b/examples/struct.txt new file mode 100644 index 0000000..22f6c60 --- /dev/null +++ b/examples/struct.txt @@ -0,0 +1,14 @@ +package main + +import "fmt" + +type Person struct { + FirstName string + LastName string +} + +func main() { + john := Person{FirstName: "John", LastName: "Doe"} + fmt.Println(john) + fmt.Println(john.FirstName) +}