github.com/giovannyortegon/go@v0.0.0-20220115155912-8890063f5bdd/Fundamentals/struct/main.go (about)

     1  package main
     2  
     3  import "fmt"
     4  
     5  type persona struct {
     6  	nombre string
     7  	apellido string
     8  	edad int
     9  }
    10  
    11  
    12  func main() {
    13  	p1 := persona{"Bill", "Gates", 65}
    14  	p2 := persona{"Giovanny", "Ortegon", 36}
    15  
    16  	fmt.Println("Persona 1:", p1)
    17  	fmt.Println("Persona 2:", p2)
    18  }