ocket8888 commented on a change in pull request #3186: All functionality for 
the admin program is now located in admin.go
URL: https://github.com/apache/trafficcontrol/pull/3186#discussion_r246536151
 
 

 ##########
 File path: traffic_ops/app/db/admin.go
 ##########
 @@ -303,12 +303,12 @@ func loadSchema() {
 }
 
 func reverseSchema() {
-       fmt.Println("WARNING: the '" + CmdReverseSchema + "' command will be 
removed with Traffic Ops Perl because it will no longer be necessary")
-       cmd := exec.Command("db/admin.pl", "--env="+Environment, 
CmdReverseSchema)
+       fmt.Fprintf(os.Stderr, "WARNING: the '%s' command will be removed with 
Traffic Ops Perl because it will no longer be necessary\n", CmdReverseSchema)
+       cmd := exec.Command("db/reverse_schema.pl")
 
 Review comment:
   From the Go docs:
   ```go
           // If Env is nil, the new process uses the current process's
           // environment.
   ```
   However, it looks like the re-write to Go dropped the Perl script's 
behaviour of setting `MOJO_MODE` - probably because only `reverse_schema` used 
it and that was calling back to the Perl script anyway.
   
   tl;dr I took your suggestion.

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