Fix capitalization for godoc
@@ -5,9 +5,9 @@ import (
"net/http"
)
-// maxBytesLimit is the max http request size, in bytes (see https://github.com/sensu/sensu-alpha-documentation/blob/master/97-FAQ.md)
+// MaxBytesLimit is the max http request size, in bytes (see https://github.com/sensu/sensu-alpha-documentation/blob/master/97-FAQ.md)
const (
- maxBytesLimit = 512000
+ MaxBytesLimit = 512000
)
// LimitRequest is an HTTP middleware that enforces request limits
@@ -16,7 +16,7 @@ type LimitRequest struct{}
// Then middleware
func (l LimitRequest) Then(next http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
- r.Body = http.MaxBytesReader(w, r.Body, maxBytesLimit)
+ r.Body = http.MaxBytesReader(w, r.Body, MaxBytesLimit)
r.Header.Add("Content-Type", "application/x-www-form-urlencoded")
err := r.ParseForm()
if err != nil && err != io.EOF {
