swaggest / jsonschema-go

JSON Schema mapping for Go
https://pkg.go.dev/github.com/swaggest/jsonschema-go
MIT License
112 stars 14 forks source link

Fix value method call on nil pointer #111

Closed vearutop closed 7 months ago

github-actions[bot] commented 7 months ago

Lines Of Code

Language Files Lines Code Comments Blanks Complexity Bytes
Go 7 2343 (+8) 1589 (+6) 275 479 (+2) 618 (+3) 56.9K (+172B)
Go (test) 13 3520 (+35) 2606 (+32) 308 606 (+3) 51 88.5K (+1.1K)
github-actions[bot] commented 7 months ago

Go API Changes

# summary
Inferred base version: v0.3.67
Suggested version: v0.3.68
github-actions[bot] commented 7 months ago

Unit Test Coverage

total: (statements) 79.3% changed lines: (statements) 100.0%

Coverage of changed lines | File | Function | Coverage | |----------------|-----------------|----------| | Total | | 100.0% | | reflect.go | | 100.0% | | reflect.go:389 | checkTitle | 100.0% | | reflect.go:407 | reflect | 100.0% | | reflect.go:558 | safeInterface | 100.0% | | reflect.go:566 | applySubSchemas | 100.0% |
Coverage diff with base branch | File | Function | Base Coverage | Current Coverage | |------------|---------------|---------------|------------------| | Total | | 79.3% | 79.3% (0.0%) | | reflect.go | safeInterface | no function | 100.0% |
codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 74.61%. Comparing base (2d5f6b0) to head (dad5367).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #111 +/- ## ========================================== + Coverage 74.54% 74.61% +0.06% ========================================== Files 7 7 Lines 1218 1221 +3 ========================================== + Hits 908 911 +3 Misses 243 243 Partials 67 67 ``` | [Flag](https://app.codecov.io/gh/swaggest/jsonschema-go/pull/111/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=swaggest) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/swaggest/jsonschema-go/pull/111/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=swaggest) | `74.61% <100.00%> (+0.06%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=swaggest#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 7 months ago

Benchmark Result

Benchmark diff with base branch ``` name old time/op new time/op delta Schema_UnmarshalJSON_raw-4 61.1µs ± 0% 61.2µs ± 3% ~ (p=0.394 n=6+6) Schema_UnmarshalJSON-4 487µs ± 0% 490µs ± 2% ~ (p=0.240 n=6+6) Schema_MarshalJSON_raw-4 44.1µs ± 2% 43.5µs ± 0% ~ (p=0.052 n=6+5) Schema_MarshalJSON-4 185µs ± 2% 188µs ± 1% +1.48% (p=0.041 n=6+6) name old alloc/op new alloc/op delta Schema_UnmarshalJSON_raw-4 31.7kB ± 0% 31.7kB ± 0% ~ (p=0.134 n=6+6) Schema_UnmarshalJSON-4 180kB ± 0% 180kB ± 0% ~ (p=0.455 n=6+6) Schema_MarshalJSON_raw-4 14.6kB ± 0% 14.6kB ± 0% ~ (p=0.182 n=6+6) Schema_MarshalJSON-4 53.9kB ± 0% 53.9kB ± 0% ~ (p=0.723 n=6+6) name old allocs/op new allocs/op delta Schema_UnmarshalJSON_raw-4 457 ± 0% 457 ± 0% ~ (all equal) Schema_UnmarshalJSON-4 1.85k ± 0% 1.85k ± 0% ~ (all equal) Schema_MarshalJSON_raw-4 370 ± 0% 370 ± 0% ~ (all equal) Schema_MarshalJSON-4 468 ± 0% 468 ± 0% ~ (all equal) ```
Benchmark result ``` name time/op Schema_UnmarshalJSON_raw-4 61.2µs ± 3% Schema_UnmarshalJSON-4 490µs ± 2% Schema_MarshalJSON_raw-4 43.5µs ± 0% Schema_MarshalJSON-4 188µs ± 1% name alloc/op Schema_UnmarshalJSON_raw-4 31.7kB ± 0% Schema_UnmarshalJSON-4 180kB ± 0% Schema_MarshalJSON_raw-4 14.6kB ± 0% Schema_MarshalJSON-4 53.9kB ± 0% name allocs/op Schema_UnmarshalJSON_raw-4 457 ± 0% Schema_UnmarshalJSON-4 1.85k ± 0% Schema_MarshalJSON_raw-4 370 ± 0% Schema_MarshalJSON-4 468 ± 0% ```