volumes/mounts: remove backticks from errors

These errors used a backtick, which is not commonly used in our errors.
Change them to use single quotes instead.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2024-10-27 18:46:18 +01:00
parent 0b290094b5
commit be7d57367b
2 changed files with 3 additions and 3 deletions

View File

@@ -144,7 +144,7 @@ func windowsValidMountMode(mode string) bool {
func windowsValidateNotRoot(p string) error {
p = strings.ToLower(strings.ReplaceAll(p, `/`, `\`))
if p == "c:" || p == `c:\` {
return fmt.Errorf("destination path cannot be `c:` or `c:\\`: %v", p)
return fmt.Errorf(`destination path (%v) cannot be 'c:' or 'c:\'`, p)
}
return nil
}

View File

@@ -44,8 +44,8 @@ func TestWindowsParseMountRaw(t *testing.T) {
`..\`: "invalid volume specification: ",
`c:\:..\`: "invalid volume specification: ",
`c:\:d:\:xyzzy`: "invalid volume specification: ",
`c:`: "cannot be `c:`",
`c:\`: "cannot be `c:`",
`c:`: "cannot be 'c:'",
`c:\`: "cannot be 'c:'",
`c:\notexist:d:`: `source path does not exist: c:\notexist`,
`c:\windows\system32\ntdll.dll:d:`: `source path must be a directory`,
`name<:d:`: `invalid volume specification`,