优化代码

This commit is contained in:
刘祥超
2023-08-08 12:02:21 +08:00
parent 8ac115f865
commit f4258ed00e
12 changed files with 26 additions and 19 deletions

View File

@@ -133,7 +133,7 @@ func (this *CCCheckpoint) Options() []OptionInterface {
option.Size = 8
option.MaxLength = 8
option.Validate = func(value string) (ok bool, message string) {
if regexp.MustCompile("^\\d+$").MatchString(value) {
if regexp.MustCompile(`^\d+$`).MatchString(value) {
ok = true
return
}