Clean NewVM func

This commit is contained in:
AlexSSD7 2023-09-02 11:10:14 +01:00
commit cd5b6dc48d
6 changed files with 360 additions and 184 deletions

View file

@ -23,5 +23,11 @@ func validateArgStrValue(s string) error {
return fmt.Errorf("commas are not allowed")
}
if strings.Contains(s, "\\") {
// Backslashes are theoretically allowed, but they rarely work as intended.
// For Windows paths, forward slashes should be used.
return fmt.Errorf("backslashes are not allowed")
}
return nil
}