rob05c commented on a change in pull request #2314: Remove
deliveryservice.org_server_fqdn column/compute it from Origin table
URL: https://github.com/apache/trafficcontrol/pull/2314#discussion_r195205994
##########
File path:
traffic_ops/traffic_ops_golang/deliveryservice/deliveryservicesv13.go
##########
@@ -306,6 +312,88 @@ func createDefaultRegex(tx *sql.Tx, dsID int, xmlID
string) error {
return nil
}
+func parseOrgServerFQDN(orgServerFQDN string) (*string, *string, *string,
error) {
Review comment:
This doesn't correctly parse the FQDN though. For example, `https://[:80`
parses.
Even aside from the FQDN, I don't have any confidence that regex is correct.
Regexes are always hard to read. I know the standard library is more code, but
it's guaranteed to be correct, and it makes it easier for someone who comes
along in the future to be certain the parsing is correct.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services