Skip to content

IPAndPort.fromString factory method which does validation#348

Merged
nbrownus merged 4 commits intomainfrom
ip-and-port-from-string
Feb 12, 2026
Merged

IPAndPort.fromString factory method which does validation#348
nbrownus merged 4 commits intomainfrom
ip-and-port-from-string

Conversation

@nbrownus
Copy link
Contributor

This is a starting point for yaml import. Currently targeting yaml -> Site conversion to occur in dart land. Other parts of the Site model will eventually get a fromYaml factory, static helper method, or in the case of simple objects like IPAndPort, fromString can be sufficient.

We currently only have 1 caller for IPAndPort.fromString. Getting an IPAndPort into a site config should have passed through the current ipValidator or dnsValidator which is more or less identical to the new validation IPAndPort.fromString is doing. I don't think we will break site rendering for anyone as a result.

JackDoan
JackDoan previously approved these changes Feb 12, 2026
Copy link
Contributor

@jasikpark jasikpark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks fine to me

@nbrownus nbrownus merged commit d64e494 into main Feb 12, 2026
5 checks passed
@nbrownus nbrownus deleted the ip-and-port-from-string branch February 12, 2026 22:06
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.

3 participants