Optional run 2-3 args + -c flag
This commit is contained in:
parent
4d504f70d1
commit
2a2cf158fd
4 changed files with 69 additions and 23 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue