jweinst1
4/29/2016 - 5:59 AM

an implementation of nested structs in go

an implementation of nested structs in go

package main

import (
	"fmt"
)

type objenv struct {
	contents map[string]objenv
}





func main() {
	practice := objenv{contents:make(map[string]objenv)}
	practice.contents["std"] = objenv{contents:make(map[string]objenv)}
	practice.contents["std"].contents["plus"] = objenv{contents:make(map[string]objenv)}
	fmt.Println(practice)

}