Skip to content

chore: remove traefik duration types#7

Open
steveiliop56 wants to merge 1 commit intomainfrom
chore/remove-duration
Open

chore: remove traefik duration types#7
steveiliop56 wants to merge 1 commit intomainfrom
chore/remove-duration

Conversation

@steveiliop56
Copy link
Copy Markdown
Member

@steveiliop56 steveiliop56 commented Apr 28, 2026

Summary by CodeRabbit

  • Refactor

    • Removed custom duration type implementation and consolidated duration handling to use standard time.Duration exclusively across parsing, encoding, and decoding operations.
    • Simplified internal conversion logic by eliminating special-case handling for the custom duration type.
  • Documentation

    • Removed documentation references to custom duration type, including configuration examples and usage patterns.

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Apr 28, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 288ef416-5bf1-4930-ada4-c36f1d25a483

📥 Commits

Reviewing files that changed from the base of the PR and between 902cee6 and 7fa6af5.

📒 Files selected for processing (8)
  • README.md
  • flag/flag_test.go
  • parser/element_fill.go
  • parser/element_fill_test.go
  • parser/flat_encode.go
  • parser/flat_encode_test.go
  • types/duration.go
  • types/duration_test.go
💤 Files with no reviewable changes (8)
  • README.md
  • parser/flat_encode_test.go
  • flag/flag_test.go
  • types/duration_test.go
  • parser/element_fill.go
  • parser/flat_encode.go
  • parser/element_fill_test.go
  • types/duration.go

📝 Walkthrough

Walkthrough

This PR removes the custom types.Duration type and all references to it across the codebase. The custom type that supported integer seconds or duration-format strings is deleted from the types package, along with its implementation, tests, documentation, and integration points in the parser and encoder modules.

Changes

Cohort / File(s) Summary
Custom Type Implementation
types/duration.go, types/duration_test.go
Removes the custom Duration type definition and all associated methods (Set, String, MarshalText, UnmarshalText, MarshalJSON, UnmarshalJSON), plus comprehensive test coverage for parsing, encoding, and round-trip serialization.
Parser Integration
parser/element_fill.go, parser/element_fill_test.go, parser/flat_encode.go, parser/flat_encode_test.go
Removes the types package import and eliminates special-case handling for types.Duration in duration parsing and encoding logic. Built-in time.Duration handling is retained.
Documentation & Test Coverage
README.md, flag/flag_test.go
Removes documentation describing the custom Duration type capabilities and removes corresponding test cases from the flag package tests.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'chore: remove traefik duration types' directly relates to the main change: removing the custom types.Duration implementation and all associated code across multiple files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant