Is the following code is an example of Embedded Struct or Nested Struct or something else? And Are we using one struct type (person) in another type struct (secretAgent) ?
package main
import "fmt"
type person struct {
first string
last string
age int
}
type secretAgent struct {
person
ltk bool
}
func main() {
sa1 := secretAgent{
person: person{
first: "James",
last: "Bond",
age: 32,
},
ltk: true,
}
fmt.Println(sa1.first, sa1.last, sa1.age, sa1.ltk)
}