vet: composite literal uses unkeyed fields

This commit is contained in:
Yousong Zhou
2020-05-27 15:08:02 +08:00
parent d25f92af8b
commit fb26b0c389
15 changed files with 177 additions and 60 deletions
+4 -1
View File
@@ -328,7 +328,10 @@ func NewPendingUsageBySchedInfo(hostId string, req *api.SchedInfo) *SPendingUsag
// but in the future, info may increase
group := &computemodels.SGroup{}
group.Id = groupId
u.InstanceGroupUsage[groupId] = &api.CandidateGroup{group, 1}
u.InstanceGroupUsage[groupId] = &api.CandidateGroup{
SGroup: group,
ReferCount: 1,
}
}
return u