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 2019/04/12 18:20:46 UTC

[GitHub] [trafficcontrol] ocket8888 removed a comment on issue #3478: Mock Traffic Ops Server

ocket8888 removed a comment on issue #3478: Mock Traffic Ops Server
URL: https://github.com/apache/trafficcontrol/pull/3478#issuecomment-482673957
 
 
   > _"To keep the responses consistent across instances/versions of the mock server, instead of randomly generating perhaps we could derive the value of the field from properties of that field like name/type."_
   
   The problem with that is it's going to have to look something like:
   ```go
   if field.Name == "Latitude" {
       field.Value = 0.0
   }
   ```
   and I'm just not sure how that's meaningfully different than 
   ```go
   Latitude: 0.0
   ```
   Besides that the former is less likely to cause compilation errors. But imo, it'd be better to get a compilation error, so you immediately know what's wrong, because either way you need to change something if the field name changes from `Latitude` to `Foo`.
   
   (I'm not sure why, but I couldn't respond to you directly, so I had to make a new comment)

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services