I have the following anonymous struct:
func wrapHal(selfHref string) interface{} {
return struct {
_links struct {
self struct {
href string
}
}
}{
_links: {self: {href: selfHref}}, # this line
}
}
However, in "this line, " I get the error missing type in composite literal
How to fix it? It is possible to initiate a anonymous nested struct in Go?