Open vearutop opened 2 years ago
Language | Files | Lines | Code | Comments | Blanks | Complexity | Bytes |
---|---|---|---|---|---|---|---|
Go | 98 (-1) | 6624 (-145) | 4789 (-122) | 478 (+23) | 1357 (-46) | 734 (-56) | 162.9K (-1.5K) |
Go (test) | 41 (-3) | 4015 (-565) | 3091 (-424) | 121 (-19) | 803 (-122) | 100 (-20) | 114K (-13.4K) |
# github.com/swaggest/rest/chirouter ## incompatible changes (*Wrapper).Connect: changed from func(string, net/http.HandlerFunc) to func(string, github.com/swaggest/fchi.Handler) (*Wrapper).Delete: changed from func(string, net/http.HandlerFunc) to func(string, github.com/swaggest/fchi.Handler) (*Wrapper).Get: changed from func(string, net/http.HandlerFunc) to func(string, github.com/swaggest/fchi.Handler) (*Wrapper).Head: changed from func(string, net/http.HandlerFunc) to func(string, github.com/swaggest/fchi.Handler) (*Wrapper).MethodFunc: removed (*Wrapper).Options: changed from func(string, net/http.HandlerFunc) to func(string, github.com/swaggest/fchi.Handler) (*Wrapper).Patch: changed from func(string, net/http.HandlerFunc) to func(string, github.com/swaggest/fchi.Handler) (*Wrapper).Post: changed from func(string, net/http.HandlerFunc) to func(string, github.com/swaggest/fchi.Handler) (*Wrapper).Put: changed from func(string, net/http.HandlerFunc) to func(string, github.com/swaggest/fchi.Handler) (*Wrapper).Trace: changed from func(string, net/http.HandlerFunc) to func(string, github.com/swaggest/fchi.Handler) Handler.ServeHTTP: changed from func(net/http.ResponseWriter, *net/http.Request) to func(context.Context, *github.com/valyala/fasthttp.RequestCtx) PathToURLValues: changed from func(*net/http.Request) (net/url.Values, error) to func(*github.com/valyala/fasthttp.RequestCtx, net/url.Values) error Router.HandleFunc, method set of *Wrapper: removed Router.HandleFunc, method set of Wrapper: removed Router.MethodNotAllowed: changed from func(net/http.HandlerFunc) to func(github.com/swaggest/fchi.Handler) Router.NotFound: changed from func(net/http.HandlerFunc) to func(github.com/swaggest/fchi.Handler) # github.com/swaggest/rest/nethttp ## incompatible changes (*Handler).ServeHTTP: changed from func(net/http.ResponseWriter, *net/http.Request) to func(context.Context, *github.com/valyala/fasthttp.RequestCtx) Handler.HandleErrResponse: changed from func(net/http.ResponseWriter, *net/http.Request, error) to func(context.Context, *github.com/valyala/fasthttp.RequestCtx, error) RequestDecoder.Decode: changed from func(*net/http.Request, interface{}, github.com/swaggest/rest.Validator) error to func(*github.com/valyala/fasthttp.RequestCtx, interface{}, github.com/swaggest/rest.Validator) error ResponseEncoder.MakeOutput: changed from func(net/http.ResponseWriter, github.com/swaggest/rest.HandlerTrait) interface{} to func(*github.com/valyala/fasthttp.RequestCtx, github.com/swaggest/rest.HandlerTrait) interface{} ResponseEncoder.WriteErrResponse: changed from func(net/http.ResponseWriter, *net/http.Request, int, interface{}) to func(*github.com/valyala/fasthttp.RequestCtx, int, interface{}) ResponseEncoder.WriteSuccessfulResponse: changed from func(net/http.ResponseWriter, *net/http.Request, interface{}, github.com/swaggest/rest.HandlerTrait) to func(*github.com/valyala/fasthttp.RequestCtx, interface{}, github.com/swaggest/rest.HandlerTrait) # github.com/swaggest/rest/openapi ## incompatible changes (*Collector).ServeHTTP: changed from func(net/http.ResponseWriter, *net/http.Request) to func(context.Context, *github.com/valyala/fasthttp.RequestCtx) # github.com/swaggest/rest/request ## incompatible changes (*DecoderFactory).SetDecoderFunc: changed from func(github.com/swaggest/rest.ParamIn, func(r *net/http.Request) (net/url.Values, error)) to func(github.com/swaggest/rest.ParamIn, func(rc *github.com/valyala/fasthttp.RequestCtx, v net/url.Values) error) DecoderFunc.Decode: changed from func(*net/http.Request, interface{}, github.com/swaggest/rest.Validator) error to func(*github.com/valyala/fasthttp.RequestCtx, interface{}, github.com/swaggest/rest.Validator) error DecoderFunc: changed from func(*net/http.Request, interface{}, github.com/swaggest/rest.Validator) error to func(*github.com/valyala/fasthttp.RequestCtx, interface{}, github.com/swaggest/rest.Validator) error Loader.LoadFromFastHTTPRequest: added Loader.LoadFromHTTPRequest: removed # github.com/swaggest/rest/response ## incompatible changes (*Encoder).MakeOutput: changed from func(net/http.ResponseWriter, github.com/swaggest/rest.HandlerTrait) interface{} to func(*github.com/valyala/fasthttp.RequestCtx, github.com/swaggest/rest.HandlerTrait) interface{} (*Encoder).WriteErrResponse: changed from func(net/http.ResponseWriter, *net/http.Request, int, interface{}) to func(*github.com/valyala/fasthttp.RequestCtx, int, interface{}) (*Encoder).WriteSuccessfulResponse: changed from func(net/http.ResponseWriter, *net/http.Request, interface{}, github.com/swaggest/rest.HandlerTrait) to func(*github.com/valyala/fasthttp.RequestCtx, interface{}, github.com/swaggest/rest.HandlerTrait) # github.com/swaggest/rest/resttest ## incompatible changes package removed # github.com/swaggest/rest/web ## incompatible changes (*Wrapper).Connect: changed from func(string, net/http.HandlerFunc) to func(string, github.com/swaggest/fchi.Handler) (*Wrapper).MethodFunc, method set of *Service: removed (*Wrapper).MethodFunc, method set of Service: removed Handler.ServeHTTP: changed from func(net/http.ResponseWriter, *net/http.Request) to func(context.Context, *github.com/valyala/fasthttp.RequestCtx) Router.HandleFunc, method set of *Service: removed Router.HandleFunc, method set of Service: removed Router.MethodNotAllowed: changed from func(net/http.HandlerFunc) to func(github.com/swaggest/fchi.Handler) Router.NotFound: changed from func(net/http.HandlerFunc) to func(github.com/swaggest/fchi.Handler) # summary Inferred base version: v0.2.28 Suggested version: v0.3.0
total: (statements) 83.5% changed lines: (statements) 88.4%, coverage is less than 90.0%, consider testing the changes more thoroughly
Merging #78 (b8fb5c5) into master (d3230eb) will increase coverage by
0.84%
. The diff coverage is83.75%
.
@@ Coverage Diff @@
## master #78 +/- ##
==========================================
+ Coverage 76.96% 77.81% +0.84%
==========================================
Files 27 26 -1
Lines 1385 1325 -60
==========================================
- Hits 1066 1031 -35
+ Misses 206 189 -17
+ Partials 113 105 -8
Flag | Coverage Δ | |
---|---|---|
unittests | 77.81% <83.75%> (+0.84%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
nethttp/wrap.go | 59.37% <0.00%> (ø) |
|
response/middleware.go | 85.71% <ø> (ø) |
|
openapi/collector.go | 61.26% <50.00%> (ø) |
|
request/file.go | 59.61% <53.33%> (-5.51%) |
:arrow_down: |
response/encoder.go | 65.69% <61.76%> (+0.81%) |
:arrow_up: |
request/middleware.go | 87.17% <66.66%> (ø) |
|
chirouter/path_decoder.go | 83.33% <75.00%> (-2.39%) |
:arrow_down: |
nethttp/handler.go | 89.02% <92.85%> (+4.14%) |
:arrow_up: |
chirouter/wrapper.go | 97.87% <100.00%> (-0.05%) |
:arrow_down: |
gzip/container.go | 68.00% <100.00%> (+0.65%) |
:arrow_up: |
... and 11 more |
:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more
This PR changes
net/http
togithub.com/valyala/fasthttp
to serve as a base for a maintable separate fork once it is ready.Additional goal of this PR is to measure performance difference and keep feature parity with original implementation.
It is not intended to be merged.