Re: [go-nuts] how to resolve the warning about composite literal uses unkeyed fields .

2016-09-11 Thread gaojingan
Thank you very much 在 2016年8月24日星期三 UTC+8下午2:07:52,Deshi Xiao写道: > > Thanks Matt > > 2016-08-23 9:56 GMT+08:00 Matt Harden >: > >> cluster.ImageFilterOptions has an embedded field of type >> types.ImageListOptions. When fields are embedded, the field name is set to >> the type. So you can write

Re: [go-nuts] how to resolve the warning about composite literal uses unkeyed fields .

2016-08-23 Thread tommy xiao
Thanks Matt 2016-08-23 9:56 GMT+08:00 Matt Harden : > cluster.ImageFilterOptions has an embedded field of type > types.ImageListOptions. When fields are embedded, the field name is set to > the type. So you can write: > > groupImages := make(map[string]apitypes.Image) > opts := cluster.ImageFilte

Re: [go-nuts] how to resolve the warning about composite literal uses unkeyed fields .

2016-08-22 Thread Matt Harden
cluster.ImageFilterOptions has an embedded field of type types.ImageListOptions. When fields are embedded, the field name is set to the type. So you can write: groupImages := make(map[string]apitypes.Image) opts := cluster.ImageFilterOptions{ ImageListOptions: apitypes.ImageListOptions{ All:

[go-nuts] how to resolve the warning about composite literal uses unkeyed fields .

2016-08-22 Thread tommy xiao
the go vet always report composite literal uses unkeyed fields warning, $ go vet `go list ./...|grep -v /vendor/` api/handlers.go:189: github.com/docker/swarm/cluster.ImageFilterOptions composite literal uses unkeyed fields exit status 1 scheduler/filter/dependency_test.go:60: github.com/docker/sw