You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: recover.go
    path of file: ./repos/plik/server/middleware
    
    the code of the file until where you have to start completion: package middleware

import (
	"net/http"

	"github.com/root-gg/plik/server/context"
)

// Recover the http request in case of panic
func Recover(ctx *context.Context, next http.Handler) http.Handler {
	return http.HandlerFunc(func(resp htt
    
func Recover(ctx *context.Context, next http.Handler) http.Handler {
	return http.HandlerFunc(func(resp http.ResponseWriter, req *http.Request) {

		// Recover from panic and return a nice http.InternalServerError()
		defer ctx.Recover()

		// This middleware need to be added after the Log middleware to
		// properly log the recovered InternalServerError

		next.ServeHTTP(resp, req)
	})
}