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.