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/02/05 21:20:12 UTC

[GitHub] rob05c commented on issue #3304: Golang endpoints should accept "string integers"

rob05c commented on issue #3304: Golang endpoints should accept "string integers"
URL: https://github.com/apache/trafficcontrol/issues/3304#issuecomment-460808032
 
 
   IMO this isn't a bad thing, following the Robustness Principle, but we shouldn't require it for Go endpoints. Perl accepts both because it's "dynamic," but if the API docs define it one way, and Perl returns that, I think it's sufficient to make Go to follow the docs.
   
   It's also going to be a bit of a mess, if we make all Go endpoints accept these for every endpoint, to change every `int` to a custom `JSONIntStr`. Not only in the Server, but it'll make the structs we share with the client awkward, and client users will have to e.g. `int(cdn.ID)` to use them.

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


With regards,
Apache Git Services