Skip to content

Commit 87c9b20

Browse files
committed
Correct error strings in iscsi library code
Signed-off-by: Humble Chirammal <[email protected]>
1 parent 3b8158a commit 87c9b20

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

iscsi/iscsi.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func waitForPathToExist(devicePath *string, maxRetries, intervalSeconds int, dev
148148

149149
func waitForPathToExistImpl(devicePath *string, maxRetries, intervalSeconds int, deviceTransport string, osStat statFunc, filepathGlob globFunc) (bool, error) {
150150
if devicePath == nil {
151-
return false, fmt.Errorf("Unable to check unspecified devicePath")
151+
return false, fmt.Errorf("unable to check unspecified devicePath")
152152
}
153153

154154
var err error
@@ -226,7 +226,7 @@ func getMultipathDisk(path string) (string, error) {
226226
}
227227
}
228228
debug.Printf("Couldn't find dm-* path for path: %s, found non dm-* path: %s", path, devicePath)
229-
return "", fmt.Errorf("Couldn't find dm-* path for path: %s, found non dm-* path: %s", path, devicePath)
229+
return "", fmt.Errorf("couldn't find dm-* path for path: %s, found non dm-* path: %s", path, devicePath)
230230
}
231231

232232
// Connect attempts to connect a volume to this node using the provided Connector info
@@ -240,7 +240,7 @@ func Connect(c Connector) (string, error) {
240240
}
241241

242242
if c.RetryCount < 0 || c.CheckInterval < 0 {
243-
return "", fmt.Errorf("Invalid RetryCount and CheckInterval combination, both must be positive integers. "+
243+
return "", fmt.Errorf("invalid RetryCount and CheckInterval combination, both must be positive integers. "+
244244
"RetryCount: %d, CheckInterval: %d", c.RetryCount, c.CheckInterval)
245245
}
246246
var devicePaths []string
@@ -318,7 +318,7 @@ func Connect(c Connector) (string, error) {
318318
devicePaths = append(devicePaths, devicePath)
319319
continue
320320
} else if err != nil {
321-
lastErr = fmt.Errorf("Couldn't attach disk, err: %v", err)
321+
lastErr = fmt.Errorf("couldn't attach disk, err: %v", err)
322322
}
323323
}
324324

0 commit comments

Comments
 (0)