Optional run 2-3 args + -c flag

This commit is contained in:
AlexSSD7 2023-09-27 15:37:28 +01:00
commit 2a2cf158fd
4 changed files with 69 additions and 23 deletions

View file

@ -37,6 +37,12 @@ func ClearUnprintableChars(s string, allowNewlines bool) string {
}, s)
}
var fsTypeRegex = regexp.MustCompile(`^[a-z0-9]+$`)
func ValidateFsType(s string) bool {
return fsTypeRegex.MatchString(s)
}
var devNameRegexp = regexp.MustCompile(`^[0-9a-z_-]+$`)
func ValidateDevName(s string) bool {