Skip to content

fix(binder): MustUnixTime docs say time.Time, not time.Duration#2988

Merged
aldas merged 1 commit into
labstack:masterfrom
c-tonneslan:fix/unixtime-docstring-time-duration
May 28, 2026
Merged

fix(binder): MustUnixTime docs say time.Time, not time.Duration#2988
aldas merged 1 commit into
labstack:masterfrom
c-tonneslan:fix/unixtime-docstring-time-duration

Conversation

@c-tonneslan
Copy link
Copy Markdown
Contributor

Spotted while reading binder.go. The doc comments on MustUnixTime, MustUnixTimeMilli, MustUnixTimeNano all say "bind to time.Duration variable" but the function signature is dest *time.Time and the non-Must variants directly above each one correctly say "binds parameter to time.Time variable". Looks like a copy-paste from the actual MustDuration doc that never got updated.

While there, dropped a stray double space and changed "nano second" to "nanosecond" on the Nano variant. No code change.

The non-Must variants (UnixTime, UnixTimeMilli, UnixTimeNano) all say
"binds parameter to time.Time variable", but the three Must* versions
copy-pasted the Duration variant's docstring and say time.Duration.
The function signature on each takes *time.Time. Also dropped the stray
double space and fixed "nano second" -> "nanosecond" on the
Nano one while in there.

Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.17%. Comparing base (01b45be) to head (890cb9e).
⚠️ Report is 6 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2988      +/-   ##
==========================================
- Coverage   93.17%   93.17%   -0.01%     
==========================================
  Files          43       43              
  Lines        4501     4499       -2     
==========================================
- Hits         4194     4192       -2     
  Misses        189      189              
  Partials      118      118              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aldas aldas merged commit dac56bc into labstack:master May 28, 2026
10 checks passed
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