Accessing structs with string never been get this much easy!! :D
type g struct {
Customer struct {
Details struct {
Profile struct {
Name string
}
}
}
}
func main() {
ng := &g{
Customer: struct{
Details struct{
Profile struct{
Name string
}
}
}{
Details: struct{
Profile struct{
Name string
}
}{
Profile: struct{
Name string
}{ Name: "Emirhan" }}},
}
fmt.Println(Notate(ng, "Customer.Details.Profile.Name"))
}