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 2022/01/12 22:07:18 UTC

[GitHub] [trafficcontrol] srijeet0406 commented on pull request #6441: Geo limit countries can now be parsed as an array and a string

srijeet0406 commented on pull request #6441:
URL: https://github.com/apache/trafficcontrol/pull/6441#issuecomment-1011494546


   > According to the title of this PR:
   > 
   > > Geo limit countries can now be parsed as an array **_and_** a string
   > 
   > (emphasis mine) but actually the old string-as-an-array doesn't work anymore: https://go.dev/play/p/AWo8KqQ6yvt
   > 
   > I'm fine with making that breaking change, and since it's in a new major API version we are free to do that, but I want to be sure that the intention is to make that breaking change. Furthermore, if we're going to be breaking it in that way, then we don't need a type alias at all, it can just be `[]string` since that's the only valid input. It's also worth noting that the output (i.e. in API responses) type is now changed as well to be an array of strings, which is already a breaking change anyway.
   
   I have changed the logic to be able to accept something like `"US,CA,IN"`, as well as `["US","CA","IN"]`.
   As for the response part, yes, it will be an array of strings starting api v4. 
   


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

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org