Skip to content

fix: trim whitespace before validating IP patterns#1136

Closed
Zqysl wants to merge 1 commit intoWei-Shaw:mainfrom
Zqysl:qingyu/sub2api-trim-ip-pattern-validation
Closed

fix: trim whitespace before validating IP patterns#1136
Zqysl wants to merge 1 commit intoWei-Shaw:mainfrom
Zqysl:qingyu/sub2api-trim-ip-pattern-validation

Conversation

@Zqysl
Copy link
Copy Markdown
Contributor

@Zqysl Zqysl commented Mar 18, 2026

Summary

  • trim surrounding whitespace before validating IP and CIDR patterns
  • keep blank values invalid after trimming
  • add unit coverage for trimmed single IP, CIDR, and batch validation behavior

Testing

  • go test -tags=unit ./internal/pkg/ip
  • go test -tags=unit ./...

@Zqysl Zqysl closed this Mar 23, 2026
@Zqysl Zqysl deleted the qingyu/sub2api-trim-ip-pattern-validation branch March 23, 2026 02:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant