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

Update uuid library #124

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Update uuid library #124

wants to merge 9 commits into from

Conversation

pzentenoe
Copy link

Pull Request Summary

This Pull Request introduces a series of improvements and updates to the UUID library, including new functionality, code refactoring, and modernization of the tests. Below are the main changes:

Implementation Changes

  1. UUID V6 and V7 Implementation:

    • Added NewV6 and NewV7 methods to the Generator interface and their respective implementations in rfc4122Generator.
    • UUID V6: Reorders time fields to allow lexicographically sortable UUIDs based on time.
    • UUID V7: Utilizes a Unix timestamp combined with random data to generate chronologically sortable UUIDs.
  2. Refactoring of Existing Methods:

    • Improved clarity and robustness of key methods like SetVersion, SetVariant, Must, and others.
    • Added detailed GoDoc comments to enhance code understanding.
  3. Enhancements in SQL Interoperability:

    • Revised and optimized the Scan and Value methods for UUID and NullUUID, ensuring clearer and more robust handling of data in SQL interactions.

Test Updates and Modernization

  1. Migration to Testify:

    • Refactored all existing tests to use testify, improving readability and the effectiveness of assertions.
    • Removed outdated dependencies like gopkg.in/check.v1, adopting a more standard approach with testing and testify.
  2. New Tests for UUID V6 and V7:

    • Added unit tests and benchmarks for NewV6 and NewV7, ensuring their correct functionality and performance.
  3. Optimization of Existing Tests:

    • Enhanced tests for existing methods such as Bytes, String, Equal, Version, and Variant to ensure complete and accurate coverage.

CI

  • travis removed
  • github action added

Documentation

  • Add badge to readme.

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