text: Q:
  
  Middleware execution flow
  
  I cannot grasp the execution flow of this code:
  func middlewareOne(next http.Handler) http.Handler {
      return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
          log.Println("Executing middlewareOne")
          next.ServeHTTP(w, r)
          log.Println("Executing middlewareOne again")
          next.ServeHTTP(w, r)
          log.Println("Executing middlewareOne yupiii")
      })
  }
  
  func middlewareTwo(next http.Handler) http.Handler {
      return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
          log.Println("Executing middlewareTwo")
          next.ServeHTTP(w, r)
          log.Println("Executing middlewareTwo again")
          next.ServeHTTP(w, r)
      })
  }
  
  func final(w http.ResponseWriter, r *http.Request) {
      log.Println("Executing finalHandler")
      w.Write([]byte("OK"))
  }
  
  func main() {
      finalHandler := http.HandlerFunc(final)
      http.Handle("/", middlewareOne(middlewareTwo(finalHandler)))
      http.ListenAndServe(":3000", nil)
  }
  
  Output:
  2019/03/25 09:16:32 Executing middlewareOne
  2019/03/25 09:16:32 Executing middlewareTwo
  2019/03/25 09:16:32 Executing finalHandler
  2019/03/25 09:16:32 Executing middlewareTwo again
  2019/03/25 09:16:32 Executing finalHandler
  2019/03/25 09:16:32 Executing middlewareOne again
  2019/03/25 09:16:32 Executing middlewareTwo
  2019/03/25 09:16:32 Executing finalHandler
  2019/03/25 09:16:32 Executing middlewareTwo again
  2019/03/25 09:16:32 Executing finalHandler
  2019/03/25 09:16:32 Executing middlewareOne yupiii
  
  Why does it print middlewareTwo again before middlewareOne again?
  
  A:
  
  Let make the stack a tree, it's easier to understand: 
  middlewareOne()
      middlewareTwo()
          finalHandler()
              return finalHandler
          return middlewareTwo
  
      middlewareTwo again()
          finalHandler()
               return finalHandler()
          return middlewareTwo again
  
      return middleware one
  
  middlewareOne again()
  ...
  
  In order for middleware one to complete and move to middleware one again it needs the middleware two to return, as middleware two includes middleware two again, it needs to run middleware two again before completing.
  
  