From 890cb9e2d7d8b01681675ce34b032e799dcc72a9 Mon Sep 17 00:00:00 2001 From: Charlie Tonneslan Date: Wed, 27 May 2026 16:45:06 -0400 Subject: [PATCH] fix(binder): MustUnixTime docs say time.Time, not time.Duration 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 --- binder.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/binder.go b/binder.go index 32029ec0f..405bdf5dd 100644 --- a/binder.go +++ b/binder.go @@ -1239,7 +1239,7 @@ func (b *ValueBinder) UnixTime(sourceParam string, dest *time.Time) *ValueBinder return b.unixTime(sourceParam, dest, false, time.Second) } -// MustUnixTime requires parameter value to exist to bind to time.Duration variable (in local time corresponding +// MustUnixTime requires parameter value to exist to bind to time.Time variable (in local time corresponding // to the given Unix time). Returns error when value does not exist. // // Example: 1609180603 bind to 2020-12-28T18:36:43.000000000+00:00 @@ -1260,7 +1260,7 @@ func (b *ValueBinder) UnixTimeMilli(sourceParam string, dest *time.Time) *ValueB return b.unixTime(sourceParam, dest, false, time.Millisecond) } -// MustUnixTimeMilli requires parameter value to exist to bind to time.Duration variable (in local time corresponding +// MustUnixTimeMilli requires parameter value to exist to bind to time.Time variable (in local time corresponding // to the given Unix time in millisecond precision). Returns error when value does not exist. // // Example: 1647184410140 bind to 2022-03-13T15:13:30.140000000+00:00 @@ -1284,8 +1284,8 @@ func (b *ValueBinder) UnixTimeNano(sourceParam string, dest *time.Time) *ValueBi return b.unixTime(sourceParam, dest, false, time.Nanosecond) } -// MustUnixTimeNano requires parameter value to exist to bind to time.Duration variable (in local Time corresponding -// to the given Unix time value in nano second precision). Returns error when value does not exist. +// MustUnixTimeNano requires parameter value to exist to bind to time.Time variable (in local time corresponding +// to the given Unix time value in nanosecond precision). Returns error when value does not exist. // // Example: 1609180603123456789 binds to 2020-12-28T18:36:43.123456789+00:00 // Example: 1000000000 binds to 1970-01-01T00:00:01.000000000+00:00