mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 10:33:35 +00:00
Enable all static-checks in golangci-lint
* Enable all static-checks in golangci-lint * Update golangci-lint version * Fix issue found in golangci-lint Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
@ -39,7 +39,7 @@ func (cs *DefaultControllerServer) ControllerUnpublishVolume(ctx context.Context
|
||||
return nil, status.Error(codes.Unimplemented, "")
|
||||
}
|
||||
|
||||
//ControllerExpandVolume expand volume
|
||||
// ControllerExpandVolume expand volume
|
||||
func (cs *DefaultControllerServer) ControllerExpandVolume(ctx context.Context, req *csi.ControllerExpandVolumeRequest) (*csi.ControllerExpandVolumeResponse, error) {
|
||||
return nil, status.Error(codes.Unimplemented, "")
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ type CSIDriver struct {
|
||||
// NewCSIDriver Creates a NewCSIDriver object. Assumes vendor
|
||||
// version is equal to driver version & does not support optional
|
||||
// driver plugin info manifest field. Refer to CSI spec for more details.
|
||||
func NewCSIDriver(name string, v string, nodeID string) *CSIDriver {
|
||||
func NewCSIDriver(name, v, nodeID string) *CSIDriver {
|
||||
if name == "" {
|
||||
klog.Errorf("Driver name missing")
|
||||
return nil
|
||||
@ -48,7 +48,7 @@ func NewCSIDriver(name string, v string, nodeID string) *CSIDriver {
|
||||
return nil
|
||||
}
|
||||
// TODO version format and validation
|
||||
if len(v) == 0 {
|
||||
if v == "" {
|
||||
klog.Errorf("Version argument missing")
|
||||
return nil
|
||||
}
|
||||
|
@ -64,11 +64,11 @@ func NewDefaultControllerServer(d *CSIDriver) *DefaultControllerServer {
|
||||
}
|
||||
|
||||
// NewControllerServiceCapability returns controller capabilities
|
||||
func NewControllerServiceCapability(cap csi.ControllerServiceCapability_RPC_Type) *csi.ControllerServiceCapability {
|
||||
func NewControllerServiceCapability(ctrlCap csi.ControllerServiceCapability_RPC_Type) *csi.ControllerServiceCapability {
|
||||
return &csi.ControllerServiceCapability{
|
||||
Type: &csi.ControllerServiceCapability_Rpc{
|
||||
Rpc: &csi.ControllerServiceCapability_RPC{
|
||||
Type: cap,
|
||||
Type: ctrlCap,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user