Disable go vet checks for “composite literal uses unkeyed fields”

后端 未结 5 1553
醉酒成梦
醉酒成梦 2021-02-04 01:13

I\'m running go vet on my CI tool, and started getting the error:

composite literal uses unkeyed fields

Because I\'m instantiating



        
5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-04 01:26

    You can disable it with the -composites=false flag: e.g.,

    go vet -composites=false .
    

    NB: go tool vet is deprecated

提交回复
热议问题