ecodeclub / ekit

支持泛型的工具库
https://doc.meoying.com/
Apache License 2.0
383 stars 164 forks source link

iox: 添加 iox.JSONReader #235

Closed flycash closed 11 months ago

flycash commented 11 months ago

在很多时候,我们需要将一个结构体在经过序列化之后,作为一个 reader 传入到别的方法里面。

为了避免写重复代码,我提供了一个封装。

image

毕竟在没有这个封装的情况下,还是过于垃圾了。

codecov[bot] commented 11 months ago

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (985e68e) 95.81% compared to head (49f6e15) 95.77%.

Files Patch % Lines
iox/json_reader.go 80.00% 2 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #235 +/- ## ========================================== - Coverage 95.81% 95.77% -0.05% ========================================== Files 61 62 +1 Lines 3250 3265 +15 ========================================== + Hits 3114 3127 +13 Misses 106 106 - Partials 30 32 +2 ```

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