From be7d57367bda7b01ddb0737cd460ae506dbc50cf Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sun, 27 Oct 2024 18:46:18 +0100 Subject: [PATCH] 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 --- volume/mounts/windows_parser.go | 2 +- volume/mounts/windows_parser_test.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/volume/mounts/windows_parser.go b/volume/mounts/windows_parser.go index c544039f78..80f1cc6ef5 100644 --- a/volume/mounts/windows_parser.go +++ b/volume/mounts/windows_parser.go @@ -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 } diff --git a/volume/mounts/windows_parser_test.go b/volume/mounts/windows_parser_test.go index 8490c32e8d..c034954954 100644 --- a/volume/mounts/windows_parser_test.go +++ b/volume/mounts/windows_parser_test.go @@ -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`,