{"action":"closed","issue":{"url":"https://api.github.com/repos/gin-gonic/gin/issues/199","labels_url":"https://api.github.com/repos/gin-gonic/gin/issues/199/labels{/name}","comments_url":"https://api.github.com/repos/gin-gonic/gin/issues/199/comments","events_url":"https://api.github.com/repos/gin-gonic/gin/issues/199/events","html_url":"https://github.com/gin-gonic/gin/issues/199","id":55690890,"number":199,"title":"Is there a way support dynamically to bind http path to handle function ?","user":{"login":"cloudtrends","id":2282880,"avatar_url":"https://avatars.githubusercontent.com/u/2282880?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudtrends","html_url":"https://github.com/cloudtrends","followers_url":"https://api.github.com/users/cloudtrends/followers","following_url":"https://api.github.com/users/cloudtrends/following{/other_user}","gists_url":"https://api.github.com/users/cloudtrends/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudtrends/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudtrends/subscriptions","organizations_url":"https://api.github.com/users/cloudtrends/orgs","repos_url":"https://api.github.com/users/cloudtrends/repos","events_url":"https://api.github.com/users/cloudtrends/events{/privacy}","received_events_url":"https://api.github.com/users/cloudtrends/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-01-27T23:25:17Z","updated_at":"2015-01-28T01:01:53Z","closed_at":"2015-01-28T01:01:53Z","body":"\r\nI had use gin in several of my golang apps .  \r\n\r\nIn order to make my app more flexible , I want dynamicall bind http path to handle function , such as\r\n\r\n( demo code )\r\n\r\nthere is a array of http path :   urls_path = [ \"/someGet\" , \"/somePost\"  \"/somePut\" ]\r\n\r\nforeach one in urls_path:\r\n     if one == \"/someGET\" :\r\n               bind(one , getting)\r\n     else if one == \"/somePost\":\r\n               bind(one, posting)\r\n      else \r\n                bind(one, putting)\r\n\r\nthe final result will the same as  writting them statically in golang code: \r\n    r.GET(\"/someGet\", getting)\r\n    r.POST(\"/somePost\", posting)\r\n    r.PUT(\"/somePut\", putting)\r\n\r\n\r\n\r\n\r\nCan I ?\r\n\r\n\r\n\r\n"}}