maybe fix some issues
This commit is contained in:
parent
66b3894d87
commit
363f0967a3
15
util.go
15
util.go
|
|
@ -32,14 +32,15 @@ func EnsureNumbers(in string) string {
|
||||||
log.Errorf("An unrecoverable error occurred when compiling a regex expression: %s", err)
|
log.Errorf("An unrecoverable error occurred when compiling a regex expression: %s", err)
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
|
if ok, _ := reg.MatchString(in); ok {
|
||||||
str, err := reg.Replace(in, "", 0, 0)
|
str, err := reg.Replace(in, "", -1, -1)
|
||||||
|
if err != nil {
|
||||||
if err != nil {
|
log.Errorf("Unable to replace text in EnsureNumbers")
|
||||||
log.Errorf("Unable to replace text in EnsureNumbers")
|
return ""
|
||||||
return ""
|
}
|
||||||
|
return str
|
||||||
}
|
}
|
||||||
return str
|
return ""
|
||||||
}
|
}
|
||||||
|
|
||||||
// EnsureLetters
|
// EnsureLetters
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue