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

后端 未结 5 1550
醉酒成梦
醉酒成梦 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:17

    $ go doc cmd/vet
    

    By default all checks are performed. If any flags are explicitly set to true, only those tests are run. Conversely, if any flag is explicitly set to false, only those tests are disabled. Thus -printf=true runs the printf check, -printf=false runs all checks except the printf check.

    Unkeyed composite literals
    
    Flag: -composites
    
    Composite struct literals that do not use the field-keyed syntax.
    

提交回复
热议问题