rob05c commented on a change in pull request #2606: Updates 'grovetccfg' to to 
write a grove.cfg from the grove servers profile
URL: https://github.com/apache/trafficcontrol/pull/2606#discussion_r207916339
 
 

 ##########
 File path: grove/grovetccfg/grovetccfg.go
 ##########
 @@ -202,11 +207,75 @@ func main() {
                }
        }
 
+       // TODO remove this once converted to 1.3 API
+       // using the 1.2 API
+       var hostName string
+       var hostServer tc.Server
+       var hostProfile tc.Profile
+       var ok bool
+       var profiles map[string]tc.Profile
+       var servers map[string]tc.Server
 
 Review comment:
   If `host == nil`, this gets passed to `createRulesOldAPI` which will panic. 
This should check if `host == nil`, and print a good error message and 
`os.Exit(1)`.
   
   That will also reduce indentation, and reduce variable pre-declarations too, 
which will make this block much nicer.

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

Reply via email to