Files
head-first-go/8-struct/main.go
Archie Fox 9ead25a417 Init commit
2025-07-18 16:39:29 +03:00

32 lines
442 B
Go

package main
import (
"fmt"
)
func main() {
fmt.Println("Глава 8 - Это struct")
// var myStruct struct {
// number float64
// word string
// toggle bool
// }
// fmt.Printf("myStruct - %#v\n", myStruct)
type myType struct {
name string
age int
active bool
}
person := myType{
name: "Archie Fox",
age: 49,
active: true,
}
// fmt.Printf("Person - %#v\n", person)
fmt.Println(person.name)
}