title: Gin-Gonic middleware declaration
body: <p>I'm using Gin-Gonic and I'm creating a custom middleware. See: <a href="https://github.com/gin-gonic/gin#custom-middleware" rel="noreferrer">https://github.com/gin-gonic/gin#custom-middleware</a></p>
  
  <p>Is there a reason why the middlewares in the doc are written as such:</p>
  
  <pre><code>func MyMiddleware() gin.HandlerFunc {
      return func (c *gin.Context) {
          // middleware
      }
  }
  r := gin.New()
  r.Use(MyMiddleware())
  </code></pre>
  
  <p>When I could simply write it like this:</p>
  
  <pre><code>func MyMiddleware(c *gin.Context) {
      // middleware
  }
  r := gin.New()
  r.Use(MyMiddleware)
  </code></pre>
  
  <p>Thanks for your help!</p>