I'm trying to rewrite a router on Go that will call for specific functions if request_uri matches the pattern. It should accept following routes:
|^/v2/Command/create$|
|^/([^/]+)/postCommands$|
|^/v2/user/sessions/(.+)/.+|
There are some others and it should be scalable, so the new route can be simply added to a map
Right now it is done on PHP via preg_match($pattern, $_SERVER['REQUEST_URI'], $params)
Is there a method to do a smiliar thing on Go?