umoci
umoci copied to clipboard
oci: casext: mediatype: switch to generics for parser functions
We cannot use generics for the parser function map, but we can use it when instantiating "simple" JSON parser functions. There are a few other downsides to Go's generics, so this should just be a minor (possibly even theoretical) performance improvement over constructing the parsed types using reflection.
Codecov Report
Merging #476 (11a8818) into main (899f30e) will increase coverage by
0.04%. The diff coverage is81.81%.
:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.
Additional details and impacted files
@@ Coverage Diff @@
## main #476 +/- ##
==========================================
+ Coverage 73.34% 73.38% +0.04%
==========================================
Files 60 60
Lines 4881 4889 +8
==========================================
+ Hits 3580 3588 +8
- Misses 940 941 +1
+ Partials 361 360 -1
| Impacted Files | Coverage Δ | |
|---|---|---|
| oci/casext/mediatype/parse.go | 76.69% <81.81%> (+1.96%) |
:arrow_up: |