mailru / easyjson

Fast JSON serializer for golang.
MIT License
4.48k stars 421 forks source link

Generates a code go staticcheck linter swears at (&*x) #207

Closed dkolistratova closed 5 years ago

dkolistratova commented 5 years ago

golang staticckeck says: &*x will be simplified to x. It will not copy x.

I have a struct with pointers in fields: type Type1 struct { ... From Type2 json:"from,omitempty" Through Type2 json:"through,omitempty" ... }

it generates: case "from": ... easyjson...decode..(in, &*out.From)

I want to check my code with linters, but have to ignore this one

shmel1k commented 5 years ago

Hello https://github.com/mailru/easyjson/pull/209 You can take code from here in order not to wait for MR to be merged.

rvasily commented 5 years ago

209 merged