rob05c commented on a change in pull request #4419: ORT Speed Improvements
URL: https://github.com/apache/trafficcontrol/pull/4419#discussion_r382273711
 
 

 ##########
 File path: traffic_ops/ort/atstccfg/toreq/caching.go
 ##########
 @@ -84,17 +105,16 @@ func WriteCacheJSON(tempDir string, cacheFileName string, 
obj interface{}) {
        }
        defer objFile.Close()
 
-       if _, err := objFile.Write(objBts); err != nil {
-               log.Errorln("writing object cache file '" + objPath + "': " + 
err.Error())
+       if err := encode(objFile, obj); err != nil {
 
 Review comment:
   Ok, I changed it to log/return errors instead of panicing.
   Heaven forbid we have the type safety of nonnullable functions.

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


With regards,
Apache Git Services

Reply via email to