Clarify `strutil` scope for time/duration formatting helpers by Copilot · Pull Request #7327 · github/gh-aw-mcpg · GitHub
Skip to content

Clarify strutil scope for time/duration formatting helpers#7327

Merged
lpcox merged 2 commits into
mainfrom
copilot/refactor-semantic-function-clustering
Jun 10, 2026
Merged

Clarify strutil scope for time/duration formatting helpers#7327
lpcox merged 2 commits into
mainfrom
copilot/refactor-semantic-function-clustering

Conversation

Copilot AI commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

The refactor analysis identified several cleanup candidates and one remaining conceptual mismatch: FormatFutureTime/FormatDuration live in internal/strutil but the file did not explain why. This PR addresses that remaining gap by documenting package intent at the helper definition site.

  • Scope clarification

    • Added a focused comment in internal/strutil/format_duration.go explaining that these helpers belong in strutil because they produce string representations used by logging and user-facing status output.
  • Behavioral impact

    • No functional or API changes; this is a documentation-only clarification.
  • Example snippet

    // Time and duration helpers live in strutil because their output is string
    // formatting used by logging and user-visible status messages.

Copilot AI changed the title [WIP] Refactor semantic function clustering analysis to remove dead code Clarify strutil scope for time/duration formatting helpers Jun 10, 2026
Copilot finished work on behalf of lpcox June 10, 2026 18:14
Copilot AI requested a review from lpcox June 10, 2026 18:14
@lpcox lpcox marked this pull request as ready for review June 10, 2026 19:51
Copilot AI review requested due to automatic review settings June 10, 2026 19:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Documents why FormatFutureTime and FormatDuration live in internal/strutil, clarifying that these helpers belong there due to their use in producing string output for logs and user-visible status messaging.

Changes:

  • Added a short, focused comment in internal/strutil/format_duration.go explaining the package fit for time/duration formatting helpers.
Show a summary per file
File Description
internal/strutil/format_duration.go Adds rationale comment describing why the time/duration formatting helpers are part of strutil.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0

@lpcox lpcox merged commit 248c3a9 into main Jun 10, 2026
39 checks passed
@lpcox lpcox deleted the copilot/refactor-semantic-function-clustering branch June 10, 2026 19:54
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.

[refactor] Semantic Function Clustering Analysis: Dead Code and Trivial Wrappers

3 participants