:* Tuesday, August 30, 2022 7:46:47 AM
> *To:* golang-nuts
> *Subject:* [go-nuts] How to resolve error Cannot use 'struct{ width,
> height float64 }{2.0, 3.0}' (type struct {...}) as the type struct {...}
>
>
> I'm developing a mvc Golang server.
>
> The model file is as foll
ust 30, 2022 7:46:47 AM
To: golang-nuts
Subject: [go-nuts] How to resolve error Cannot use 'struct{ width, height
float64 }{2.0, 3.0}' (type struct {...}) as the type struct {...}
I'm developing a mvc Golang server.
The model file is as follows:
type Object struct { ... TargetSize struct{
On Tue, 2022-08-30 at 07:46 -0700, Richard Whatever wrote:
> 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()
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