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: route_register.go
    path of file: ./repos/grafana/pkg/api/routing
    
    the code of the file until where you have to start completion: package routing

import (
	"net/http"
	"strings"

	"github.com/grafana/grafana/pkg/middleware"
	"github.com/grafana/grafana/pkg/we
    
func insertHandler(a []web.Handler, index int, value web.Handler) []web.Handler {
	if len(a) == index {
		return append(a, value)
	}
	a = append(a[:index+1], a[index:]...)
	a[index] = value
	return a
}