clab/golang/structs.go
2024-06-28 09:09:03 +01:00

52 lines
510 B
Go

package main
import (
"fmt"
)
type DateOfBirth struct {
Year uint32
Month uint8
Day uint8
}
type Lord struct {
Name string
Sex string
}
type God struct {
Name string
Birth DateOfBirth
}
func main() {
fmt.Println("Hey")
name := "Jizzus"
fmt.Println(name)
dob := DateOfBirth{
Year: 0,
Month: 12,
Day: 25,
}
lord := Lord{
Name: "Jizz",
Sex: "Lots of them",
}
fmt.Println(dob)
fmt.Println(lord)
jesus := God{
Name: name,
Birth: dob,
}
fmt.Println(jesus)
}