I'm developing a mvc Golang server.
The model file is as follows: type Object struct { ... TargetSize struct{ width, height float64 } `json:"targetSize"` ... } The controller file is as follows: func (c *GetObject) Get() []models.Object { return []models.Object{ {... struct{ width, height float64 }{2.0, 3.0}, ... }, I keep on getting the error of "Cannot use 'struct{ width, height float64 }{2.0, 3.0}' (type struct {...}) as the type struct {...}" and I don't know how to resolve this. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/a6b7d86c-8ed6-4be1-a265-3761f3b8be67n%40googlegroups.com.