You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2022/01/31 20:12:59 UTC

[GitHub] [trafficcontrol] rob05c commented on a change in pull request #6529: Add DS parameter LastRawRemap(Pre|Post) to allow raw text in remap.config

rob05c commented on a change in pull request #6529:
URL: https://github.com/apache/trafficcontrol/pull/6529#discussion_r796027787



##########
File path: lib/go-atscfg/remapdotconfig.go
##########
@@ -364,9 +413,17 @@ func getServerConfigRemapDotConfigForEdge(
 				if ds.ProfileID != nil {
 					profileremapConfigParams = profilesRemapConfigParams[*ds.ProfileID]
 				}
-				remapWarns := []string{}
-				remapText, remapWarns, err = buildEdgeRemapLine(atsMajorVersion, server, serverPackageParamData, remapText, ds, line.From, line.To, profileremapConfigParams, cacheGroups, nameTopologies)
+				var remapWarns []string
+				var dsLines RemapLines
+				dsLines, remapWarns, err = buildEdgeRemapLine(atsMajorVersion, server, serverPackageParamData, remapText, ds, line.From, line.To, profileremapConfigParams, cacheGroups, nameTopologies)
 				warnings = append(warnings, remapWarns...)
+				remapText = dsLines.Text
+
+				// Add to pre/post remap lines if this is last tier
+				if 0 < len(dsLines.Pre) || 0 < len(dsLines.Post) {

Review comment:
       Nitpick: This C idiom is confusing and unnecessary in Go




-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org