Skip to content

Commit 32d5efc

Browse files
committed
chore: fix golint errors
1 parent bb35d63 commit 32d5efc

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pkg/nfs/controllerserver.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ func getNfsVolFromID(id string) (*nfsVolume, error) {
800800
// try with separator "/"
801801
volRegex := regexp.MustCompile("^([^/]+)/(.*)/([^/]+)$")
802802
tokens := volRegex.FindStringSubmatch(id)
803-
if tokens == nil || len(tokens) < 4 {
803+
if len(tokens) < 4 {
804804
return nil, fmt.Errorf("could not split %s into server, baseDir and subDir with separator(%s)", id, "/")
805805
}
806806
server = tokens[1]

pkg/nfs/utils.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,21 +67,21 @@ func NewControllerServer(d *Driver) *ControllerServer {
6767
}
6868
}
6969

70-
func NewControllerServiceCapability(cap csi.ControllerServiceCapability_RPC_Type) *csi.ControllerServiceCapability {
70+
func NewControllerServiceCapability(c csi.ControllerServiceCapability_RPC_Type) *csi.ControllerServiceCapability {
7171
return &csi.ControllerServiceCapability{
7272
Type: &csi.ControllerServiceCapability_Rpc{
7373
Rpc: &csi.ControllerServiceCapability_RPC{
74-
Type: cap,
74+
Type: c,
7575
},
7676
},
7777
}
7878
}
7979

80-
func NewNodeServiceCapability(cap csi.NodeServiceCapability_RPC_Type) *csi.NodeServiceCapability {
80+
func NewNodeServiceCapability(c csi.NodeServiceCapability_RPC_Type) *csi.NodeServiceCapability {
8181
return &csi.NodeServiceCapability{
8282
Type: &csi.NodeServiceCapability_Rpc{
8383
Rpc: &csi.NodeServiceCapability_RPC{
84-
Type: cap,
84+
Type: c,
8585
},
8686
},
8787
}

0 commit comments

Comments
 (0)