Struct is a “container” that used in golang to collect group related information or data.
Sttruc es algo asi como un contenedor en golang sirve de recollectar informacion o data

 

 

package main

import "fmt"

type person struct {
	name          string
	age           int8
	heightinMeter float32
	hasPet        bool
}

func main() {
	john := person{
		name:          "john",
		age:           30,
		heightinMeter: 1.81,
		hasPet:        false,
	}

	fmt.Println(john.name, "is ", john.age, "years old and ", john.heightinMeter, " tall  ")
	fmt.Println(john)

}

Hier is simply explanation of Structs made by Esoteric Tech