swaggest / rest

Web services with OpenAPI and JSON Schema done quick in Go
https://pkg.go.dev/github.com/swaggest/rest
MIT License
362 stars 17 forks source link

Custom error response #69

Closed vearutop closed 2 years ago

github-actions[bot] commented 2 years ago

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 98 (+2) 6425 (+88) 4661 (+76) 427 (-12) 1337 (+24) 718 (+4) 154.8K (-28B)
Go (test) 43 4368 (+15) 3355 (+18) 125 (-7) 888 (+4) 118 121.6K (+274B)
JSON 3 (+1) 1207 (+184) 1207 (+184) 0 0 0 49.7K (+5.9K)
YAML 10 675 592 46 37 0 20.9K (+3B)
github-actions[bot] commented 2 years ago

Unit Test Coverage

total: (statements) 82.8%

Coverage diff with base branch ```diff ```
codecov[bot] commented 2 years ago

Codecov Report

Merging #69 (578da67) into master (519ca67) will increase coverage by 0.01%. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #69      +/-   ##
==========================================
+ Coverage   76.79%   76.81%   +0.01%     
==========================================
  Files          27       27              
  Lines        1323     1324       +1     
==========================================
+ Hits         1016     1017       +1     
  Misses        194      194              
  Partials      113      113              
Flag Coverage Δ
unittests 76.81% <100.00%> (+0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
trait.go 93.33% <ø> (ø)
web/service.go 100.00% <100.00%> (ø)

:mega: Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

github-actions[bot] commented 2 years ago

Go API Changes

# github.com/swaggest/rest/web
## compatible changes
Service.ResponseValidatorFactory: added

# summary
Inferred base version: v0.2.24
Suggested version: v0.3.0
github-actions[bot] commented 2 years ago

Benchmark Result

Benchmark diff with base branch ``` name old time/op new time/op delta pkg:github.com/swaggest/rest/jsonschema goos:linux goarch:amd64 RequestValidator_ValidateRequestData-2 1.44µs ± 7% 1.45µs ± 6% ~ (p=0.802 n=5+5) pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 760ns ± 8% 752ns ± 4% ~ (p=0.690 n=5+5) DecoderFunc_Decode-2 2.14µs ± 2% 2.19µs ± 4% ~ (p=0.310 n=5+5) Decoder_Decode_json-2 23.8µs ± 2% 23.8µs ± 2% ~ (p=1.000 n=5+5) Decoder_Decode_queryObject-2 5.15µs ± 6% 5.03µs ± 6% ~ (p=0.222 n=5+5) Decoder_Decode_jsonParam-2 1.94µs ± 7% 1.92µs ± 5% ~ (p=0.690 n=5+5) DecoderFactory_SetDecoderFunc-2 1.75µs ± 2% 1.77µs ± 5% ~ (p=0.690 n=5+5) pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 11.8µs ± 4% 12.0µs ± 4% ~ (p=0.421 n=5+5) Middleware_control-2 3.63µs ± 3% 3.48µs ± 1% -4.11% (p=0.008 n=5+5) name old alloc/op new alloc/op delta pkg:github.com/swaggest/rest/jsonschema goos:linux goarch:amd64 RequestValidator_ValidateRequestData-2 2.46kB ± 0% 2.46kB ± 0% ~ (all equal) pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 440B ± 0% 440B ± 0% ~ (all equal) DecoderFunc_Decode-2 1.51kB ± 0% 1.51kB ± 0% ~ (all equal) Decoder_Decode_json-2 12.2kB ± 0% 12.2kB ± 0% ~ (all equal) Decoder_Decode_queryObject-2 2.00kB ± 0% 2.00kB ± 0% ~ (all equal) Decoder_Decode_jsonParam-2 736B ± 0% 736B ± 0% ~ (all equal) DecoderFactory_SetDecoderFunc-2 1.02kB ± 0% 1.02kB ± 0% ~ (all equal) pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 1.17kB ± 5% 1.17kB ± 3% ~ (p=0.690 n=5+5) Middleware_control-2 11.2kB ± 0% 11.2kB ± 0% ~ (all equal) name old allocs/op new allocs/op delta pkg:github.com/swaggest/rest/jsonschema goos:linux goarch:amd64 RequestValidator_ValidateRequestData-2 8.00 ± 0% 8.00 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 4.00 ± 0% 4.00 ± 0% ~ (all equal) DecoderFunc_Decode-2 12.0 ± 0% 12.0 ± 0% ~ (all equal) Decoder_Decode_json-2 177 ± 0% 177 ± 0% ~ (all equal) Decoder_Decode_queryObject-2 36.0 ± 0% 36.0 ± 0% ~ (all equal) Decoder_Decode_jsonParam-2 13.0 ± 0% 13.0 ± 0% ~ (all equal) DecoderFactory_SetDecoderFunc-2 16.0 ± 0% 16.0 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 11.0 ± 0% 11.0 ± 0% ~ (all equal) Middleware_control-2 9.00 ± 0% 9.00 ± 0% ~ (all equal) ```
Benchmark result ``` name time/op pkg:github.com/swaggest/rest/jsonschema goos:linux goarch:amd64 RequestValidator_ValidateRequestData-2 1.45µs ± 6% pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 752ns ± 4% DecoderFunc_Decode-2 2.19µs ± 4% Decoder_Decode_json-2 23.8µs ± 2% Decoder_Decode_queryObject-2 5.03µs ± 6% Decoder_Decode_jsonParam-2 1.92µs ± 5% DecoderFactory_SetDecoderFunc-2 1.77µs ± 5% pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 12.0µs ± 4% Middleware_control-2 3.48µs ± 1% name alloc/op pkg:github.com/swaggest/rest/jsonschema goos:linux goarch:amd64 RequestValidator_ValidateRequestData-2 2.46kB ± 0% pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 440B ± 0% DecoderFunc_Decode-2 1.51kB ± 0% Decoder_Decode_json-2 12.2kB ± 0% Decoder_Decode_queryObject-2 2.00kB ± 0% Decoder_Decode_jsonParam-2 736B ± 0% DecoderFactory_SetDecoderFunc-2 1.02kB ± 0% pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 1.17kB ± 3% Middleware_control-2 11.2kB ± 0% name allocs/op pkg:github.com/swaggest/rest/jsonschema goos:linux goarch:amd64 RequestValidator_ValidateRequestData-2 8.00 ± 0% pkg:github.com/swaggest/rest/request goos:linux goarch:amd64 Decoder_Decode-2 4.00 ± 0% DecoderFunc_Decode-2 12.0 ± 0% Decoder_Decode_json-2 177 ± 0% Decoder_Decode_queryObject-2 36.0 ± 0% Decoder_Decode_jsonParam-2 13.0 ± 0% DecoderFactory_SetDecoderFunc-2 16.0 ± 0% pkg:github.com/swaggest/rest/response/gzip goos:linux goarch:amd64 Middleware-2 11.0 ± 0% Middleware_control-2 9.00 ± 0% ```
github-actions[bot] commented 2 years ago

Examples Benchmark Result

Benchmark diff with base branch ``` name old time/op new time/op delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 22.4µs ± 1% 24.4µs ±15% +9.11% (p=0.016 n=4+5) _directGzipHead-2 22.6µs ± 3% 24.3µs ± 7% +7.80% (p=0.008 n=5+5) _noDirectGzip-2 132µs ± 4% 127µs ± 1% -3.72% (p=0.008 n=5+5) _directGzip_decode-2 411µs ± 0% 431µs ± 0% +4.88% (p=0.008 n=5+5) _noDirectGzip_decode-2 131µs ± 1% 127µs ± 1% -2.99% (p=0.008 n=5+5) _jsonBody-2 39.6µs ± 1% 41.7µs ± 2% +5.43% (p=0.008 n=5+5) _jsonBodyValidation-2 45.5µs ± 1% 47.8µs ± 1% +5.20% (p=0.008 n=5+5) _outputHeaders-2 21.8µs ± 0% 22.9µs ± 2% +4.95% (p=0.008 n=5+5) _requestResponseMapping-2 38.9µs ± 1% 41.7µs ± 3% +7.26% (p=0.008 n=5+5) _validation-2 41.8µs ± 1% 44.1µs ± 1% +5.64% (p=0.008 n=5+5) _noValidation-2 28.1µs ± 1% 28.9µs ± 1% +2.56% (p=0.008 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 22.9µs ± 0% 24.4µs ±10% +6.19% (p=0.016 n=4+5) _directGzipHead-2 22.8µs ± 0% 23.3µs ± 1% +2.54% (p=0.008 n=5+5) _noDirectGzip-2 132µs ± 1% 127µs ± 1% -3.50% (p=0.008 n=5+5) _directGzip_decode-2 414µs ± 1% 436µs ± 4% +5.21% (p=0.008 n=5+5) _noDirectGzip_decode-2 132µs ± 1% 127µs ± 1% -3.54% (p=0.008 n=5+5) _jsonBody-2 40.0µs ± 1% 42.1µs ± 1% +5.13% (p=0.008 n=5+5) _jsonBodyValidation-2 45.9µs ± 1% 48.2µs ± 1% +5.02% (p=0.008 n=5+5) _outputHeaders-2 22.2µs ± 1% 23.1µs ± 2% +3.98% (p=0.008 n=5+5) _requestResponseMapping-2 39.9µs ± 2% 42.2µs ± 4% +5.94% (p=0.008 n=5+5) _validation-2 42.5µs ± 1% 44.7µs ± 2% +5.29% (p=0.008 n=5+5) _noValidation-2 43.2µs ± 1% 29.1µs ± 1% -32.61% (p=0.008 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 26.1µs ± 1% 26.4µs ± 1% ~ (p=0.056 n=5+5) _ok-2 26.5µs ± 2% 26.6µs ± 1% ~ (p=0.421 n=5+5) _invalidBody-2 36.8µs ± 1% 37.1µs ± 1% ~ (p=0.095 n=5+5) name old B:rcvd/op new B:rcvd/op delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 639 ± 0% 639 ± 0% ~ (all equal) _directGzipHead-2 183 ± 0% 183 ± 0% ~ (all equal) _noDirectGzip-2 1.04k ± 0% 1.04k ± 0% ~ (all equal) _directGzip_decode-2 639 ± 0% 639 ± 0% ~ (all equal) _noDirectGzip_decode-2 1.04k ± 0% 1.04k ± 0% ~ (all equal) _jsonBody-2 208 ± 0% 208 ± 0% ~ (all equal) _jsonBodyValidation-2 194 ± 0% 194 ± 0% ~ (all equal) _outputHeaders-2 155 ± 0% 155 ± 0% ~ (all equal) _requestResponseMapping-2 94.0 ± 0% 94.0 ± 0% ~ (all equal) _validation-2 177 ± 0% 177 ± 0% ~ (all equal) _noValidation-2 177 ± 0% 177 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 639 ± 0% 639 ± 0% ~ (all equal) _directGzipHead-2 183 ± 0% 183 ± 0% ~ (all equal) _noDirectGzip-2 1.04k ± 0% 1.04k ± 0% ~ (all equal) _directGzip_decode-2 639 ± 0% 639 ± 0% ~ (all equal) _noDirectGzip_decode-2 1.04k ± 0% 1.04k ± 0% ~ (all equal) _jsonBody-2 208 ± 0% 208 ± 0% ~ (all equal) _jsonBodyValidation-2 194 ± 0% 194 ± 0% ~ (all equal) _outputHeaders-2 155 ± 0% 155 ± 0% ~ (all equal) _requestResponseMapping-2 94.0 ± 0% 94.0 ± 0% ~ (all equal) _validation-2 177 ± 0% 177 ± 0% ~ (all equal) _noValidation-2 177 ± 0% 177 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 337 ± 0% 337 ± 0% ~ (all equal) _ok-2 359 ± 0% 359 ± 0% ~ (all equal) _invalidBody-2 435 ± 0% 435 ± 0% ~ (all equal) name old B:sent/op new B:sent/op delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 103 ± 0% 103 ± 0% ~ (all equal) _directGzipHead-2 104 ± 0% 104 ± 0% ~ (all equal) _noDirectGzip-2 117 ± 0% 117 ± 0% ~ (all equal) _directGzip_decode-2 116 ± 0% 116 ± 0% ~ (all equal) _noDirectGzip_decode-2 130 ± 0% 130 ± 0% ~ (all equal) _jsonBody-2 188 ± 0% 188 ± 0% ~ (all equal) _jsonBodyValidation-2 192 ± 0% 192 ± 0% ~ (all equal) _outputHeaders-2 77.0 ± 0% 77.0 ± 0% ~ (all equal) _requestResponseMapping-2 169 ± 0% 169 ± 0% ~ (all equal) _validation-2 170 ± 0% 170 ± 0% ~ (all equal) _noValidation-2 173 ± 0% 173 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 103 ± 0% 103 ± 0% ~ (all equal) _directGzipHead-2 104 ± 0% 104 ± 0% ~ (all equal) _noDirectGzip-2 117 ± 0% 117 ± 0% ~ (all equal) _directGzip_decode-2 116 ± 0% 116 ± 0% ~ (all equal) _noDirectGzip_decode-2 130 ± 0% 130 ± 0% ~ (all equal) _jsonBody-2 188 ± 0% 188 ± 0% ~ (all equal) _jsonBodyValidation-2 192 ± 0% 192 ± 0% ~ (all equal) _outputHeaders-2 77.0 ± 0% 77.0 ± 0% ~ (all equal) _requestResponseMapping-2 169 ± 0% 169 ± 0% ~ (all equal) _validation-2 170 ± 0% 170 ± 0% ~ (all equal) _noValidation-2 173 ± 0% 173 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 74.0 ± 0% 74.0 ± 0% ~ (all equal) _ok-2 74.0 ± 0% 74.0 ± 0% ~ (all equal) _invalidBody-2 137 ± 0% 137 ± 0% ~ (all equal) name old rps new rps delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 44.6k ± 1% 41.1k ±14% -7.84% (p=0.016 n=4+5) _directGzipHead-2 44.3k ± 3% 41.1k ± 7% -7.15% (p=0.008 n=5+5) _noDirectGzip-2 7.58k ± 4% 7.87k ± 1% +3.84% (p=0.008 n=5+5) _directGzip_decode-2 2.43k ± 0% 2.32k ± 0% -4.66% (p=0.008 n=5+5) _noDirectGzip_decode-2 7.64k ± 1% 7.88k ± 1% +3.09% (p=0.008 n=5+5) _jsonBody-2 25.3k ± 1% 24.0k ± 2% -5.13% (p=0.008 n=5+5) _jsonBodyValidation-2 22.0k ± 1% 20.9k ± 1% -4.94% (p=0.008 n=5+5) _outputHeaders-2 45.9k ± 0% 43.8k ± 2% -4.70% (p=0.008 n=5+5) _requestResponseMapping-2 25.7k ± 1% 24.0k ± 3% -6.75% (p=0.008 n=5+5) _validation-2 23.9k ± 1% 22.7k ± 1% -5.33% (p=0.008 n=5+5) _noValidation-2 35.5k ± 1% 34.7k ± 1% -2.50% (p=0.008 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 43.6k ± 1% 41.1k ±10% -5.59% (p=0.016 n=4+5) _directGzipHead-2 43.9k ± 0% 42.8k ± 1% -2.48% (p=0.008 n=5+5) _noDirectGzip-2 7.59k ± 1% 7.87k ± 1% +3.63% (p=0.008 n=5+5) _directGzip_decode-2 2.41k ± 1% 2.30k ± 4% -4.90% (p=0.008 n=5+5) _noDirectGzip_decode-2 7.59k ± 1% 7.87k ± 1% +3.66% (p=0.008 n=5+5) _jsonBody-2 25.0k ± 1% 23.8k ± 1% -4.87% (p=0.008 n=5+5) _jsonBodyValidation-2 21.8k ± 1% 20.7k ± 1% -4.78% (p=0.008 n=5+5) _outputHeaders-2 45.0k ± 1% 43.2k ± 2% -3.82% (p=0.008 n=5+5) _requestResponseMapping-2 25.1k ± 2% 23.7k ± 4% -5.58% (p=0.008 n=5+5) _validation-2 23.5k ± 1% 22.4k ± 2% -5.01% (p=0.008 n=5+5) _noValidation-2 23.2k ± 1% 34.4k ± 1% +48.38% (p=0.008 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 38.3k ± 1% 37.9k ± 1% ~ (p=0.056 n=5+5) _ok-2 37.7k ± 2% 37.6k ± 1% ~ (p=0.421 n=5+5) _invalidBody-2 27.2k ± 1% 26.9k ± 1% ~ (p=0.095 n=5+5) name old alloc/op new alloc/op delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 3.92kB ± 0% 3.92kB ± 0% ~ (p=0.159 n=5+5) _directGzipHead-2 3.92kB ± 0% 3.92kB ± 0% +0.11% (p=0.008 n=5+5) _noDirectGzip-2 5.99kB ±16% 6.49kB ±16% ~ (p=0.310 n=5+5) _directGzip_decode-2 402kB ± 0% 403kB ± 0% ~ (p=0.056 n=5+5) _noDirectGzip_decode-2 5.35kB ± 8% 5.38kB ± 7% ~ (p=1.000 n=5+5) _jsonBody-2 13.2kB ± 0% 13.2kB ± 0% +0.04% (p=0.008 n=5+5) _jsonBodyValidation-2 19.0kB ± 0% 19.0kB ± 0% +0.06% (p=0.008 n=5+5) _outputHeaders-2 3.70kB ± 0% 3.71kB ± 0% +0.08% (p=0.008 n=5+5) _requestResponseMapping-2 16.6kB ± 0% 16.6kB ± 0% +0.06% (p=0.008 n=5+5) _validation-2 16.5kB ± 0% 16.6kB ± 0% +0.04% (p=0.016 n=5+5) _noValidation-2 6.13kB ± 0% 6.14kB ± 0% +0.28% (p=0.008 n=5+5) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 3.94kB ± 0% 3.94kB ± 0% +0.06% (p=0.024 n=5+5) _directGzipHead-2 3.93kB ± 0% 3.94kB ± 0% +0.09% (p=0.008 n=5+5) _noDirectGzip-2 6.36kB ±21% 6.63kB ±19% ~ (p=0.690 n=5+5) _directGzip_decode-2 402kB ± 0% 403kB ± 0% +0.08% (p=0.008 n=5+5) _noDirectGzip_decode-2 5.30kB ±11% 5.55kB ± 7% ~ (p=0.421 n=5+5) _jsonBody-2 13.3kB ± 0% 13.3kB ± 0% +0.06% (p=0.008 n=5+5) _jsonBodyValidation-2 19.0kB ± 0% 19.0kB ± 0% +0.05% (p=0.008 n=5+5) _outputHeaders-2 3.71kB ± 0% 3.71kB ± 0% +0.04% (p=0.024 n=5+5) _requestResponseMapping-2 16.7kB ± 0% 16.7kB ± 0% +0.05% (p=0.008 n=5+5) _validation-2 16.6kB ± 0% 16.6kB ± 0% +0.07% (p=0.008 n=5+5) _noValidation-2 16.6kB ± 0% 6.2kB ± 0% -62.78% (p=0.008 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 4.88kB ± 0% 4.88kB ± 0% ~ (p=0.286 n=4+5) _ok-2 4.78kB ± 0% 4.78kB ± 0% ~ (p=0.629 n=4+4) _invalidBody-2 8.67kB ± 0% 8.67kB ± 0% ~ (p=0.171 n=4+4) name old allocs/op new allocs/op delta pkg:github.com/swaggest/rest/_examples/advanced goos:linux goarch:amd64 _directGzip-2 42.0 ± 0% 42.0 ± 0% ~ (all equal) _directGzipHead-2 42.0 ± 0% 42.0 ± 0% ~ (all equal) _noDirectGzip-2 49.4 ± 3% 49.6 ± 3% ~ (p=1.000 n=5+5) _directGzip_decode-2 500 ± 0% 501 ± 0% ~ (p=0.238 n=4+5) _noDirectGzip_decode-2 50.0 ± 0% 50.0 ± 0% ~ (all equal) _jsonBody-2 127 ± 0% 127 ± 0% ~ (all equal) _jsonBodyValidation-2 183 ± 0% 183 ± 0% ~ (all equal) _outputHeaders-2 37.0 ± 0% 37.0 ± 0% ~ (all equal) _requestResponseMapping-2 123 ± 0% 123 ± 0% ~ (all equal) _validation-2 152 ± 0% 152 ± 0% ~ (all equal) _noValidation-2 72.0 ± 0% 72.0 ± 0% ~ (all equal) pkg:github.com/swaggest/rest/_examples/advanced-generic goos:linux goarch:amd64 _directGzip-2 43.0 ± 0% 43.0 ± 0% ~ (all equal) _directGzipHead-2 43.0 ± 0% 43.0 ± 0% ~ (all equal) _noDirectGzip-2 50.4 ± 3% 50.4 ± 3% ~ (p=1.000 n=5+5) _directGzip_decode-2 501 ± 0% 502 ± 0% +0.36% (p=0.008 n=5+5) _noDirectGzip_decode-2 51.0 ± 0% 51.0 ± 0% ~ (all equal) _jsonBody-2 128 ± 0% 128 ± 0% ~ (all equal) _jsonBodyValidation-2 184 ± 0% 184 ± 0% ~ (all equal) _outputHeaders-2 37.0 ± 0% 37.0 ± 0% ~ (all equal) _requestResponseMapping-2 124 ± 0% 124 ± 0% ~ (all equal) _validation-2 153 ± 0% 153 ± 0% ~ (all equal) _noValidation-2 153 ± 0% 73 ± 0% -52.29% (p=0.008 n=5+5) pkg:github.com/swaggest/rest/_examples/task-api/internal/infra/nethttp goos:linux goarch:amd64 _notFoundSrv-2 54.0 ± 0% 54.0 ± 0% ~ (all equal) _ok-2 50.0 ± 0% 50.0 ± 0% ~ (all equal) _invalidBody-2 100 ± 0% 100 ± 0% ~ (all equal) ```