mhoppa commented on a change in pull request #4015: Rewrite /federations to Go 
- POST/PUT/DELETE
URL: https://github.com/apache/trafficcontrol/pull/4015#discussion_r339822218
 
 

 ##########
 File path: traffic_ops/traffic_ops_golang/api/api.go
 ##########
 @@ -86,7 +86,7 @@ func WriteRespRaw(w http.ResponseWriter, r *http.Request, v 
interface{}) {
                return
        }
        w.Header().Set("Content-Type", "application/json")
-       w.Write(bts)
+       w.Write(append(bts, '\n'))
 
 Review comment:
   I believe this is causing a unit test to fail in this package ->
   
   ```
   --- FAIL: TestReadHandler (0.00s)
       
/Users/mhoppa509/go/src/github.com/apache/trafficcontrol/traffic_ops/traffic_ops_golang/api/shared_handlers_test.go:187:
 Expected body {"response":[{"ID":1}]} got {"response":[{"ID":1}]}
   ```

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