Fixed golint issues in RBD code

This commit is contained in:
pohsienshih
2019-11-12 22:50:37 +08:00
parent 665c6648eb
commit 9bfe818229
5 changed files with 92 additions and 93 deletions

View File

@@ -140,7 +140,7 @@ type fakeDiskManager struct {
rbdDevices map[string]bool
}
func NewFakeDiskManager() *fakeDiskManager {
func newFakeDiskManager() *fakeDiskManager {
return &fakeDiskManager{
rbdImageLocks: make(map[string]bool),
rbdMapIndex: 0,
@@ -256,7 +256,7 @@ func doTestPlugin(t *testing.T, c *testcase) {
}
fakeMounter := fakeVolumeHost.GetMounter(plug.GetPluginName()).(*mount.FakeMounter)
fakeNodeName := types.NodeName("localhost")
fdm := NewFakeDiskManager()
fdm := newFakeDiskManager()
// attacher
attacher, err := plug.(*rbdPlugin).newAttacherInternal(fdm)
@@ -539,7 +539,7 @@ func TestGetDeviceMountPath(t *testing.T) {
if err != nil {
t.Errorf("Can't find the plugin by name")
}
fdm := NewFakeDiskManager()
fdm := newFakeDiskManager()
// attacher
attacher, err := plug.(*rbdPlugin).newAttacherInternal(fdm)