Skip to content

Add explicit lt/lte/gt/gte checks#499

Merged
irees merged 2 commits intomainfrom
lt-lte-gt-gte
Sep 18, 2025
Merged

Add explicit lt/lte/gt/gte checks#499
irees merged 2 commits intomainfrom
lt-lte-gt-gte

Conversation

@irees
Copy link
Copy Markdown
Contributor

@irees irees commented Sep 18, 2025

No description provided.

@irees irees requested a review from Copilot September 18, 2025 08:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds explicit validation support for greater than (gt), greater than or equal (gte), less than (lt), and less than or equal (lte) checks, replacing the previous range-based validation approach. The changes introduce more granular comparison operators for field validation.

  • Replaces RangeMin/RangeMax fields with four specific comparison operators (gt, gte, lt, lte)
  • Updates validation logic to handle the new comparison operators with appropriate error messages
  • Migrates existing range validation usage to use the new gte operator

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tt/reflect_test.go Adds comprehensive test coverage for the new gt, gte, lt, and lte validation operators
tt/reflect.go Updates validation logic to support the four new comparison operators and adds helper function
internal/tags/tags.go Refactors FieldInfo struct and tag parsing to support the new comparison operators
gtfs/pathway.go Migrates from range-based validation to the new comparison operators

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@irees irees marked this pull request as ready for review September 18, 2025 08:17
@irees irees merged commit c98a19e into main Sep 18, 2025
6 checks passed
@irees irees deleted the lt-lte-gt-gte branch September 18, 2025 08:23
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.

2 participants