GaijinEntertainment / go-exhaustruct

golang analyzer that finds structures with uninitialized fields
MIT License
128 stars 13 forks source link

Allow ignoring empty structs #114

Open bkmeneguello opened 1 month ago

bkmeneguello commented 1 month ago

A common idiom in Go is creating empty structs instead of using other constructs, like:

But this linter complains about that. Could be an option to "ignore empty struct initializations"?

shanee-vanstone-sp commented 1 week ago

Hi Bkmeneguello. I'd really love the same feature too! I had a go at putting together a pull request for it if you want to try it out. https://github.com/GaijinEntertainment/go-exhaustruct/pull/118