迁移并重构项目,优化了执行流程
This commit is contained in:
		
							
								
								
									
										20
									
								
								internal/class/Acme/Method.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								internal/class/Acme/Method.go
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,20 @@
 | 
			
		||||
package Acme
 | 
			
		||||
 | 
			
		||||
import (
 | 
			
		||||
	"regexp"
 | 
			
		||||
	"strings"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
func (acme *Object) EmailVerify() bool {
 | 
			
		||||
	var EmailRegex = regexp.MustCompile(`^[a-zA-Z0-9.!#$%&'*+/=?^_{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$`)
 | 
			
		||||
	email := strings.TrimSpace(acme.Email)
 | 
			
		||||
	if len(email) < 3 || len(email) > 254 {
 | 
			
		||||
		return false
 | 
			
		||||
	}
 | 
			
		||||
	return EmailRegex.MatchString(email)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (acme *Object) DNSProviderVerify() bool {
 | 
			
		||||
	acme.DNSProvider.Choose()
 | 
			
		||||
	return true
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user