我想不出如何初始化嵌套 struct .在这里可以找到一个示例: http://play.golang.org/p/NL6VXdHrjh个
package main
type Configuration struct {
Val string
Proxy struct {
Address string
Port string
}
}
func main() {
c := &Configuration{
Val: "test",
Proxy: {
Address: "addr",
Port: "80",
}
}
}