Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(serializer): remove contract #33

Merged
merged 2 commits into from
Nov 23, 2023
Merged

Conversation

flc1125
Copy link
Contributor

@flc1125 flc1125 commented Nov 22, 2023

No description provided.

Copy link

what-the-diff bot commented Nov 22, 2023

PR Summary

  • Package Addition and File Structure Changes in go-kratos-components
    The github.com/go-packagist/go-kratos-components/serializer/json package has been updated with architectural changes. This includes renaming the serializer/json.go file to serializer/json/json.go, test files have been updated accordingly with json_test.go now residing inside the json folder.

  • Update in Import Statement in Cache
    In the cache/redis/store.go file, import references have been updated resulting in the serializerContract being replaced by serializer. Also, a new variable json.Serializer has been introduced to the serializer struct.

  • Renaming and Repointing of Variables in JSON Serializer
    The file serializer/json/json.go has witnessed a package name change from serializer to json. A notable renaming occurred with the global variable JsonSerializer updated to Serializer, pointing now to an instance of jsonSerializer.

  • Test Function Update in JSON Serializer
    Changes in the serializer/json_test.go move the fetching of package serializer to serializer/json and modifying the test function name to TestSerializer. This function now uses the instance json.Serializer.

  • Renaming of Serializable Contract
    The file contract/serializable.go is renamed to serializer/serializable.go with the changing of the package name from contract to serializer. Additionally, enhanced documentation has been provided for Serialize and Unserialize methods with added comments.

Note: The summaries above are deduced from the git diff and might not provide a full context around the changes.

Copy link

codecov bot commented Nov 22, 2023

Codecov Report

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

Comparison is base (7f2130f) 74.42% compared to head (508cc6f) 75.00%.

Files Patch % Lines
cache/redis/store.go 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master      #33      +/-   ##
==========================================
+ Coverage   74.42%   75.00%   +0.57%     
==========================================
  Files          22       22              
  Lines         610      608       -2     
==========================================
+ Hits          454      456       +2     
+ Misses        139      135       -4     
  Partials       17       17              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@flc1125 flc1125 merged commit ebe94ee into master Nov 23, 2023
5 of 6 checks passed
@flc1125 flc1125 deleted the refactor-serializer branch November 23, 2023 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant