chore: fix golint errors
This commit is contained in:
parent
bb35d633db
commit
32d5efcf7e
@ -800,7 +800,7 @@ func getNfsVolFromID(id string) (*nfsVolume, error) {
|
|||||||
// try with separator "/"
|
// try with separator "/"
|
||||||
volRegex := regexp.MustCompile("^([^/]+)/(.*)/([^/]+)$")
|
volRegex := regexp.MustCompile("^([^/]+)/(.*)/([^/]+)$")
|
||||||
tokens := volRegex.FindStringSubmatch(id)
|
tokens := volRegex.FindStringSubmatch(id)
|
||||||
if tokens == nil || len(tokens) < 4 {
|
if len(tokens) < 4 {
|
||||||
return nil, fmt.Errorf("could not split %s into server, baseDir and subDir with separator(%s)", id, "/")
|
return nil, fmt.Errorf("could not split %s into server, baseDir and subDir with separator(%s)", id, "/")
|
||||||
}
|
}
|
||||||
server = tokens[1]
|
server = tokens[1]
|
||||||
|
|||||||
@ -67,21 +67,21 @@ func NewControllerServer(d *Driver) *ControllerServer {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewControllerServiceCapability(cap csi.ControllerServiceCapability_RPC_Type) *csi.ControllerServiceCapability {
|
func NewControllerServiceCapability(c csi.ControllerServiceCapability_RPC_Type) *csi.ControllerServiceCapability {
|
||||||
return &csi.ControllerServiceCapability{
|
return &csi.ControllerServiceCapability{
|
||||||
Type: &csi.ControllerServiceCapability_Rpc{
|
Type: &csi.ControllerServiceCapability_Rpc{
|
||||||
Rpc: &csi.ControllerServiceCapability_RPC{
|
Rpc: &csi.ControllerServiceCapability_RPC{
|
||||||
Type: cap,
|
Type: c,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewNodeServiceCapability(cap csi.NodeServiceCapability_RPC_Type) *csi.NodeServiceCapability {
|
func NewNodeServiceCapability(c csi.NodeServiceCapability_RPC_Type) *csi.NodeServiceCapability {
|
||||||
return &csi.NodeServiceCapability{
|
return &csi.NodeServiceCapability{
|
||||||
Type: &csi.NodeServiceCapability_Rpc{
|
Type: &csi.NodeServiceCapability_Rpc{
|
||||||
Rpc: &csi.NodeServiceCapability_RPC{
|
Rpc: &csi.NodeServiceCapability_RPC{
|
||||||
Type: cap,
|
Type: c,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user