Merge pull request #23660 from goltermann/vetclean

Automatic merge from submit-queue

Additional go vet fixes

Mostly:
- pass lock by value
- bad syntax for struct tag value
- example functions not formatted properly
This commit is contained in:
k8s-merge-robot
2016-04-12 06:22:16 -07:00
33 changed files with 136 additions and 118 deletions

View File

@@ -2048,7 +2048,7 @@ func (x *KubeletConfiguration) CodecEncodeSelf(e *codec1978.Encoder) {
}
} else {
z.EncSendContainerState(codecSelfer_containerMapKey1234)
r.EncodeString(codecSelferC_UTF81234, string("VolumeStatsAggPeriod"))
r.EncodeString(codecSelferC_UTF81234, string("volumeStatsAggPeriod"))
z.EncSendContainerState(codecSelfer_containerMapValue1234)
yy149 := &x.VolumeStatsAggPeriod
yym150 := z.EncBinary()
@@ -3190,7 +3190,7 @@ func (x *KubeletConfiguration) codecDecodeSelfFromMap(l int, d *codec1978.Decode
} else {
x.LowDiskSpaceThresholdMB = int(r.DecodeInt(codecSelferBitsize1234))
}
case "VolumeStatsAggPeriod":
case "volumeStatsAggPeriod":
if r.TryDecodeAsNil() {
x.VolumeStatsAggPeriod = pkg1_unversioned.Duration{}
} else {

View File

@@ -230,7 +230,7 @@ type KubeletConfiguration struct {
// be rejected.
LowDiskSpaceThresholdMB int `json:"lowDiskSpaceThresholdMB"`
// How frequently to calculate and cache volume disk usage for all pods
VolumeStatsAggPeriod unversioned.Duration `json:volumeStatsAggPeriod`
VolumeStatsAggPeriod unversioned.Duration `json:"volumeStatsAggPeriod"`
// networkPluginName is the name of the network plugin to be invoked for
// various events in kubelet/pod lifecycle
NetworkPluginName string `json:"networkPluginName"`