title: How to add multiple groups to gin routing for api version inheritance?
body: <p>I'm currently working on a API with Go + Gin.</p>
  
  <p>The API should include a version string, for example the string v1</p>
  
  <pre><code>http://127.0.0.1:3000/v1/user/get_username
  </code></pre>
  
  <p>That is no problem, because I can create a group with Gin</p>
  
  <pre><code>v1 := router.Group("/v1")
  v1.GET("/user/get_username", modules.UserGetUsername)
  </code></pre>
  
  <p>But... if I start a new API-Version "v2" and the code within the function  UserGetUsername didn't changed I must do the following</p>
  
  <pre><code>v1 := router.Group("/v1")
  v1.GET("/user/get_username", modules.UserGetUsername)
  v2 := router.Group("/v2")
  v2.GET("/user/get_username", modules.UserGetUsername)
  </code></pre>
  
  <p>Is there a nicer solution for that - maybe something like that:</p>
  
  <pre><code>v1_v2 := router.Group("/v1").AnotherGroup("/v2")
  v1_v2.GET("/user/get_username", modules.UserGetUsername)
  </code></pre>
  
  <p>Thank you for your suggestions.</p>