func ContextDI() MiddlewareFunc {
	return func(b *Bubble) error {
		for idx, argT := range b.ArgumentTypes {
			if contextType.AssignableTo(argT) {
				b.Arguments[idx] = reflect.ValueOf(b.Context)
				continue
			}
		}
		return b.Next()
	}
}
ContextDI injects Bubble.Context into the bubble.Arguments.
package ucon
import (
	"context"
	"crypto/rand"
	"crypto/sha256"
	"encoding/json"
	"errors"
	"fmt"
	"io/ioutil"
	"net/http"
	"reflect"
	"strings"
	"github.com/favclip/golidator"
)
var httpReqType = reflect.TypeOf((*http.Request)(nil))
var httpRespType = reflect.TypeOf((*http.ResponseWriter)(nil)).Elem()
var contextType = reflect.TypeOf((*context.Context)(nil)).Elem()
var errorType = reflect.TypeOf((*error)(nil)).Elem()
var stringParserType = reflect.TypeOf((*StringParser)(nil)).Elem()
var PathParameterKey = &struct{ temp string }{}
var ErrInvalidPathParameterType = newBadRequestf("path parameter type should be map[string]string")
var ErrPathParameterFieldMissing = newBadRequestf("can't find path parameter in struct")
var ErrCSRFBadToken = newBadRequestf("invalid CSRF token")
type HTTPErrorResponse interface {
	StatusCode() int
	ErrorMessage() interface{}
}
type HTTPResponseModifier interface {
	Handle(b *Bubble) error
}
type httpError struct {
	Code    int         `json:"code"`
	Message interface{} `json:"message"`
}
func (he *httpError) StatusCode() int {
	return he.Code
}
func (he *httpError) ErrorMessage() interface{} {
	return he
}
func (he *httpError) Error() string {
	return fmt.Sprintf("status code %d: %s", he.StatusCode(), he.ErrorMessage())
}
func newBadRequestf(format string, a ...interface{}) *httpError {
	return &httpError{
		Code:    http.StatusBadRequest,
		Message: fmt.Sprintf(format, a...),
	}
}
type StringParser interface {
	ParseString(value string) (interface{}, error)
}
func HTTPRWDI() MiddlewareFunc {
	return func(b *Bubble) error {
		for idx, argT := range b.ArgumentTypes {
			if httpReqType.AssignableTo(argT) {
				b.Arguments[idx] = reflect.ValueOf(b.R)
				continue
			}
			if httpRespType.AssignableTo(argT) {
				b.Arguments[idx] = reflect.ValueOf(b.W)
				continue
			}
		}
		return b.Next()
	}
}
func NetContextDI() MiddlewareFunc {
	return ContextDI()
}