Re: [go-nuts] HTTP request matching different endpoint - gorilla mux

2021-09-02 Thread Van Fury
Thank you for your answer. Very helpful. On Thursday, September 2, 2021 at 8:01:54 PM UTC+3 seank...@gmail.com wrote: > gorilla/mux tests routes in the order they're added. > You can register your shared_data route before the {id} one if you must > keep the ambiguous path, > though the better o

Re: [go-nuts] HTTP request matching different endpoint - gorilla mux

2021-09-02 Thread Sean Liao
gorilla/mux tests routes in the order they're added. You can register your shared_data route before the {id} one if you must keep the ambiguous path, though the better option is to not have ambiguous paths in the first place. On Thursday, September 2, 2021 at 6:18:36 PM UTC+2 bse...@computer.org

Re: [go-nuts] HTTP request matching different endpoint - gorilla mux

2021-09-02 Thread burak serdar
Your paths are ambiguous. "/nfdm-fdm/v2/shared-data" matches "/nfdm-fdm/v2/{id}" where id=shared_data. You can use a regex for the path with {id} to exclude the "shared_data" match. On Thu, Sep 2, 2021 at 10:13 AM Van Fury wrote: > Hi All, > > I have the following to handler functions, DataSets