diff --git a/README.md b/README.md index 7f08727..c51e73c 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ todo te será familiar. ## Características -- Sin dependencias +- Sin dependencias ajenas a Google - Procesamiento y salida de ficheros HTML - Paginación lista para usar - Vinculación entrada formulario y JSON a tipos estructurados. diff --git a/ron.go b/ron.go index 6ba23fb..9778111 100644 --- a/ron.go +++ b/ron.go @@ -53,6 +53,7 @@ type ( ) const ( + RequestID string = "request_id" HeaderJSON string = "application/json" HeaderHTML_UTF8 string = "text/html; charset=utf-8" HeaderCSS_UTF8 string = "text/css; charset=utf-8" @@ -166,7 +167,7 @@ func (e *Engine) requestIdMiddleware() Middleware { if id == "" { id = fmt.Sprintf("%d", time.Now().UnixNano()) } - ctx = context.WithValue(ctx, "requestId", id) + ctx = context.WithValue(ctx, RequestID, id) next.ServeHTTP(w, r.WithContext(ctx)) }) }