mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-13 02:33:34 +00:00
util: address golangci-lint issues
address golangci-lint issues in utils Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
committed by
mergify[bot]
parent
8c4a38eec6
commit
4b7cafe821
@ -212,7 +212,7 @@ func parseKernelRelease(release string) (int, int, int, int, error) {
|
||||
extraversion := 0
|
||||
if n > minVersions {
|
||||
n, err = fmt.Sscanf(extra, ".%d%s", &sublevel, &extra)
|
||||
if err != nil && n == 0 && len(extra) > 0 && extra[0] != '-' && extra[0] == '.' {
|
||||
if err != nil && n == 0 && extra != "" && extra[0] != '-' && extra[0] == '.' {
|
||||
return 0, 0, 0, 0, fmt.Errorf("failed to parse subversion from %s: %w", release, err)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user