禁用兽医检查“复合文字使用无键字段”

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?

$ 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.

You can disable it or you can fix the code instead:

a := A{B: b}

playground

go tool vet -composites=false .

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

go vet -composites=false .

NB: go tool vet is deprecated