Correcting all go vet errors

This commit is contained in:
Kris Rousey
2015-08-07 18:52:23 -07:00
parent 9fdd793555
commit 565189f5b8
118 changed files with 285 additions and 298 deletions

View File

@@ -180,7 +180,7 @@ func (r *hostPathRecycler) Recycle() error {
{
Name: "vol",
VolumeSource: api.VolumeSource{
HostPath: &api.HostPathVolumeSource{r.path},
HostPath: &api.HostPathVolumeSource{Path: r.path},
},
},
},

View File

@@ -72,7 +72,7 @@ func TestRecycler(t *testing.T) {
}
recycler, err := plug.NewRecycler(spec)
if err != nil {
t.Error("Failed to make a new Recyler: %v", err)
t.Errorf("Failed to make a new Recyler: %v", err)
}
if recycler.GetPath() != spec.PersistentVolumeSource.HostPath.Path {
t.Errorf("Expected %s but got %s", spec.PersistentVolumeSource.HostPath.Path, recycler.GetPath())
@@ -112,7 +112,7 @@ func TestPlugin(t *testing.T) {
}
spec := &api.Volume{
Name: "vol1",
VolumeSource: api.VolumeSource{HostPath: &api.HostPathVolumeSource{"/vol1"}},
VolumeSource: api.VolumeSource{HostPath: &api.HostPathVolumeSource{Path: "/vol1"}},
}
pod := &api.Pod{ObjectMeta: api.ObjectMeta{UID: types.UID("poduid")}}
builder, err := plug.NewBuilder(volume.NewSpecFromVolume(spec), pod, volume.VolumeOptions{}, nil)
@@ -152,7 +152,7 @@ func TestPersistentClaimReadOnlyFlag(t *testing.T) {
},
Spec: api.PersistentVolumeSpec{
PersistentVolumeSource: api.PersistentVolumeSource{
HostPath: &api.HostPathVolumeSource{"foo"},
HostPath: &api.HostPathVolumeSource{Path: "foo"},
},
ClaimRef: &api.ObjectReference{
Name: "claimA",