Skip to content

Commit a9b9d08

Browse files
Bump golangci to 1.61 (#2664)
Co-authored-by: kayrus <[email protected]>
1 parent 1ea7eb6 commit a9b9d08

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

.golangci.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
run:
2+
concurrency: 2
23
timeout: 10m0s
34
linters:
45
enable:
56
- gofmt
67
output:
7-
format: line-number
8+
formats:
9+
 - format: line-number
10+
 path: stdout

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ $(BUILD_CMDS): $(SOURCES)
8181
test: unit functional
8282

8383
check: work
84-
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.56.0 run ./...
84+
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0 run ./...
8585

8686
unit: work
8787
go test -tags=unit $(shell go list ./... | sed -e '/sanity/ { N; d; }' | sed -e '/tests/ {N; d;}') $(TESTARGS)

cmd/manila-csi-plugin/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ func main() {
7171
Short: "CSI Manila driver",
7272
Run: func(cmd *cobra.Command, args []string) {
7373
if err := validateShareProtocolSelector(protoSelector); err != nil {
74-
klog.Fatalf(err.Error())
74+
klog.Fatal(err.Error())
7575
}
7676

7777
manilaClientBuilder := &manilaclient.ClientBuilder{UserAgent: "manila-csi-plugin", ExtraUserAgentData: userAgentData}

pkg/util/blockdevice/blockdevice_linux.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func findBlockDeviceRescanPath(path string) (string, error) {
4141
if len(parts) == 3 && strings.HasPrefix(parts[1], "dev") {
4242
return filepath.EvalSymlinks(filepath.Join("/sys/block", parts[2], "device", "rescan"))
4343
}
44-
return "", fmt.Errorf("illegal path for device " + devicePath)
44+
return "", fmt.Errorf("illegal path for device %s", devicePath)
4545
}
4646

4747
// IsBlockDevice checks whether device on the path is a block device
@@ -128,13 +128,13 @@ func RescanBlockDeviceGeometry(devicePath string, deviceMountPath string, newSiz
128128
func RescanDevice(devicePath string) error {
129129
blockDeviceRescanPath, err := findBlockDeviceRescanPath(devicePath)
130130
if err != nil {
131-
return fmt.Errorf("Device does not have rescan path " + devicePath)
131+
return fmt.Errorf("Device does not have rescan path %s", devicePath)
132132
}
133133

134134
klog.V(3).Infof("Resolved block device path from %q to %q", devicePath, blockDeviceRescanPath)
135135
err = triggerRescan(blockDeviceRescanPath)
136136
if err != nil {
137-
return fmt.Errorf("Error rescanning new block device geometry " + devicePath)
137+
return fmt.Errorf("Error rescanning new block device geometry %s", devicePath)
138138
}
139139
return nil
140140
}

0 commit comments

Comments
 (0)