Init commit

This commit is contained in:
Archie Fox
2025-07-18 16:39:29 +03:00
commit 9ead25a417
2 changed files with 34 additions and 0 deletions

31
8-struct/main.go Normal file
View File

@@ -0,0 +1,31 @@
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)
}