I'm running go vet on my CI tool, and started getting the error:
composite literal uses unkeyed fields Because I'm instantiating
type A struct { *B } like this:
A{b} // b is of type *B I don't care for this warning, and want to disable it on my go vet checks. How do I do this?
You can disable it or you can fix the code instead:
a := A{B: b} playground
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With