package parsers import ( "regexp" ) /* constants.go - 核心解析器常量 精简后只保留 parsers.go 所需的常量。 */ // ============================================================================= // 端口常量 // ============================================================================= const ( // MinPort 最小端口号 MinPort = 1 // MaxPort 最大端口号 MaxPort = 65535 ) // ============================================================================= // 哈希验证常量 // ============================================================================= const ( // HashRegexPattern MD5哈希正则表达式(32位十六进制) HashRegexPattern = `^[a-fA-F0-9]{32}$` ) // ============================================================================= // 预编译正则表达式 // ============================================================================= var ( // CompiledHashRegex 预编译的MD5哈希正则 CompiledHashRegex *regexp.Regexp ) func init() { CompiledHashRegex = regexp.MustCompile(HashRegexPattern) }