Re: [go-nuts] How to resolve error Cannot use 'struct{ width, height float64 }{2.0, 3.0}' (type struct {...}) as the type struct {...}

2022-08-30 Thread Richard Whatever
:* 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

Re: [go-nuts] How to resolve error Cannot use 'struct{ width, height float64 }{2.0, 3.0}' (type struct {...}) as the type struct {...}

2022-08-30 Thread Harris, Andrew
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{

Re: [go-nuts] How to resolve error Cannot use 'struct{ width, height float64 }{2.0, 3.0}' (type struct {...}) as the type struct {...}

2022-08-30 Thread 'Dan Kortschak' via golang-nuts
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()

[go-nuts] How to resolve error Cannot use 'struct{ width, height float64 }{2.0, 3.0}' (type struct {...}) as the type struct {...}

2022-08-30 Thread Richard Whatever
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