rob05c commented on a change in pull request #5247:
URL: https://github.com/apache/trafficcontrol/pull/5247#discussion_r525515017
##########
File path: lib/go-atscfg/parentdotconfig.go
##########
@@ -1001,62 +1030,66 @@ func GetTopologyParents(
continue
}
- if !HasRequiredCapabilities(serverCapabilities[*sv.ID],
dsRequiredCapabilities[*ds.ID]) {
+ if !hasRequiredCapabilities(serverCapabilities[*sv.ID],
dsRequiredCapabilities[*ds.ID]) {
continue
}
if *sv.Cachegroup == parentCG {
- parentStr, err := serverParentStr(&sv.ServerNullable,
sv.Params)
+ parentStr, err := serverParentStr(&sv.Server, sv.Params)
if err != nil {
- return nil, nil, errors.New("getting server
parent string: " + err.Error())
+ return nil, nil, warnings, errors.New("getting
server parent string: " + err.Error())
}
if parentStr != "" { // will be empty if server is
not_a_parent (possibly other reasons)
parentStrs = append(parentStrs, parentStr)
}
}
if *sv.Cachegroup == secondaryParentCG {
- parentStr, err := serverParentStr(&sv.ServerNullable,
sv.Params)
+ parentStr, err := serverParentStr(&sv.Server, sv.Params)
if err != nil {
- return nil, nil, errors.New("getting server
parent string: " + err.Error())
+ return nil, nil, warnings, errors.New("getting
server parent string: " + err.Error())
}
secondaryParentStrs = append(secondaryParentStrs,
parentStr)
}
}
- return parentStrs, secondaryParentStrs, nil
+ return parentStrs, secondaryParentStrs, warnings, nil
}
-func GetOriginURI(fqdn string) (*url.URL, error) {
+// GetOriginURI returns the URL, any warnings, and any error.
Review comment:
metanit: GoDoc doesn't technically apply to unexported symbols.
But yes, we prefer to follow it anyway for code readability. Fixed
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]