mirror of
https://github.com/labstack/echo.git
synced 2024-11-24 08:22:21 +02:00
Tidy up comments for value binders
This commit is contained in:
parent
59d2eaa4ac
commit
63c62bcbe5
86
binder.go
86
binder.go
@ -209,7 +209,7 @@ func (b *ValueBinder) CustomFunc(sourceParam string, customFunc func(values []st
|
||||
return b.customFunc(sourceParam, customFunc, false)
|
||||
}
|
||||
|
||||
// MustCustomFunc requires parameter values to exist to be bind with Func. Returns error when value does not exist.
|
||||
// MustCustomFunc requires parameter values to exist to bind with Func. Returns error when value does not exist.
|
||||
func (b *ValueBinder) MustCustomFunc(sourceParam string, customFunc func(values []string) []error) *ValueBinder {
|
||||
return b.customFunc(sourceParam, customFunc, true)
|
||||
}
|
||||
@ -246,7 +246,7 @@ func (b *ValueBinder) String(sourceParam string, dest *string) *ValueBinder {
|
||||
return b
|
||||
}
|
||||
|
||||
// MustString requires parameter value to exist to be bind to string variable. Returns error when value does not exist
|
||||
// MustString requires parameter value to exist to bind to string variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustString(sourceParam string, dest *string) *ValueBinder {
|
||||
if b.failFast && b.errors != nil {
|
||||
return b
|
||||
@ -275,7 +275,7 @@ func (b *ValueBinder) Strings(sourceParam string, dest *[]string) *ValueBinder {
|
||||
return b
|
||||
}
|
||||
|
||||
// MustStrings requires parameter values to exist to be bind to slice of string variables. Returns error when value does not exist
|
||||
// MustStrings requires parameter values to exist to bind to slice of string variables. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustStrings(sourceParam string, dest *[]string) *ValueBinder {
|
||||
if b.failFast && b.errors != nil {
|
||||
return b
|
||||
@ -307,7 +307,7 @@ func (b *ValueBinder) BindUnmarshaler(sourceParam string, dest BindUnmarshaler)
|
||||
return b
|
||||
}
|
||||
|
||||
// MustBindUnmarshaler requires parameter value to exist to be bind to destination implementing BindUnmarshaler interface.
|
||||
// MustBindUnmarshaler requires parameter value to exist to bind to destination implementing BindUnmarshaler interface.
|
||||
// Returns error when value does not exist
|
||||
func (b *ValueBinder) MustBindUnmarshaler(sourceParam string, dest BindUnmarshaler) *ValueBinder {
|
||||
if b.failFast && b.errors != nil {
|
||||
@ -343,7 +343,7 @@ func (b *ValueBinder) JSONUnmarshaler(sourceParam string, dest json.Unmarshaler)
|
||||
return b
|
||||
}
|
||||
|
||||
// MustJSONUnmarshaler requires parameter value to exist to be bind to destination implementing json.Unmarshaler interface.
|
||||
// MustJSONUnmarshaler requires parameter value to exist to bind to destination implementing json.Unmarshaler interface.
|
||||
// Returns error when value does not exist
|
||||
func (b *ValueBinder) MustJSONUnmarshaler(sourceParam string, dest json.Unmarshaler) *ValueBinder {
|
||||
if b.failFast && b.errors != nil {
|
||||
@ -379,7 +379,7 @@ func (b *ValueBinder) TextUnmarshaler(sourceParam string, dest encoding.TextUnma
|
||||
return b
|
||||
}
|
||||
|
||||
// MustTextUnmarshaler requires parameter value to exist to be bind to destination implementing encoding.TextUnmarshaler interface.
|
||||
// MustTextUnmarshaler requires parameter value to exist to bind to destination implementing encoding.TextUnmarshaler interface.
|
||||
// Returns error when value does not exist
|
||||
func (b *ValueBinder) MustTextUnmarshaler(sourceParam string, dest encoding.TextUnmarshaler) *ValueBinder {
|
||||
if b.failFast && b.errors != nil {
|
||||
@ -404,7 +404,7 @@ func (b *ValueBinder) BindWithDelimiter(sourceParam string, dest interface{}, de
|
||||
return b.bindWithDelimiter(sourceParam, dest, delimiter, false)
|
||||
}
|
||||
|
||||
// MustBindWithDelimiter requires parameter value to exist to be bind destination by suitable conversion function.
|
||||
// MustBindWithDelimiter requires parameter value to exist to bind destination by suitable conversion function.
|
||||
// Delimiter is used before conversion to split parameter value to separate values
|
||||
func (b *ValueBinder) MustBindWithDelimiter(sourceParam string, dest interface{}, delimiter string) *ValueBinder {
|
||||
return b.bindWithDelimiter(sourceParam, dest, delimiter, true)
|
||||
@ -453,7 +453,7 @@ func (b *ValueBinder) Int64(sourceParam string, dest *int64) *ValueBinder {
|
||||
return b.intValue(sourceParam, dest, 64, false)
|
||||
}
|
||||
|
||||
// MustInt64 requires parameter value to exist to be bind to int64 variable. Returns error when value does not exist
|
||||
// MustInt64 requires parameter value to exist to bind to int64 variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustInt64(sourceParam string, dest *int64) *ValueBinder {
|
||||
return b.intValue(sourceParam, dest, 64, true)
|
||||
}
|
||||
@ -463,7 +463,7 @@ func (b *ValueBinder) Int32(sourceParam string, dest *int32) *ValueBinder {
|
||||
return b.intValue(sourceParam, dest, 32, false)
|
||||
}
|
||||
|
||||
// MustInt32 requires parameter value to exist to be bind to int32 variable. Returns error when value does not exist
|
||||
// MustInt32 requires parameter value to exist to bind to int32 variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustInt32(sourceParam string, dest *int32) *ValueBinder {
|
||||
return b.intValue(sourceParam, dest, 32, true)
|
||||
}
|
||||
@ -473,7 +473,7 @@ func (b *ValueBinder) Int16(sourceParam string, dest *int16) *ValueBinder {
|
||||
return b.intValue(sourceParam, dest, 16, false)
|
||||
}
|
||||
|
||||
// MustInt16 requires parameter value to exist to be bind to int16 variable. Returns error when value does not exist
|
||||
// MustInt16 requires parameter value to exist to bind to int16 variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustInt16(sourceParam string, dest *int16) *ValueBinder {
|
||||
return b.intValue(sourceParam, dest, 16, true)
|
||||
}
|
||||
@ -483,7 +483,7 @@ func (b *ValueBinder) Int8(sourceParam string, dest *int8) *ValueBinder {
|
||||
return b.intValue(sourceParam, dest, 8, false)
|
||||
}
|
||||
|
||||
// MustInt8 requires parameter value to exist to be bind to int8 variable. Returns error when value does not exist
|
||||
// MustInt8 requires parameter value to exist to bind to int8 variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustInt8(sourceParam string, dest *int8) *ValueBinder {
|
||||
return b.intValue(sourceParam, dest, 8, true)
|
||||
}
|
||||
@ -493,7 +493,7 @@ func (b *ValueBinder) Int(sourceParam string, dest *int) *ValueBinder {
|
||||
return b.intValue(sourceParam, dest, 0, false)
|
||||
}
|
||||
|
||||
// MustInt requires parameter value to exist to be bind to int variable. Returns error when value does not exist
|
||||
// MustInt requires parameter value to exist to bind to int variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustInt(sourceParam string, dest *int) *ValueBinder {
|
||||
return b.intValue(sourceParam, dest, 0, true)
|
||||
}
|
||||
@ -621,7 +621,7 @@ func (b *ValueBinder) Int64s(sourceParam string, dest *[]int64) *ValueBinder {
|
||||
return b.intsValue(sourceParam, dest, false)
|
||||
}
|
||||
|
||||
// MustInt64s requires parameter value to exist to be bind to int64 slice variable. Returns error when value does not exist
|
||||
// MustInt64s requires parameter value to exist to bind to int64 slice variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustInt64s(sourceParam string, dest *[]int64) *ValueBinder {
|
||||
return b.intsValue(sourceParam, dest, true)
|
||||
}
|
||||
@ -631,7 +631,7 @@ func (b *ValueBinder) Int32s(sourceParam string, dest *[]int32) *ValueBinder {
|
||||
return b.intsValue(sourceParam, dest, false)
|
||||
}
|
||||
|
||||
// MustInt32s requires parameter value to exist to be bind to int32 slice variable. Returns error when value does not exist
|
||||
// MustInt32s requires parameter value to exist to bind to int32 slice variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustInt32s(sourceParam string, dest *[]int32) *ValueBinder {
|
||||
return b.intsValue(sourceParam, dest, true)
|
||||
}
|
||||
@ -641,7 +641,7 @@ func (b *ValueBinder) Int16s(sourceParam string, dest *[]int16) *ValueBinder {
|
||||
return b.intsValue(sourceParam, dest, false)
|
||||
}
|
||||
|
||||
// MustInt16s requires parameter value to exist to be bind to int16 slice variable. Returns error when value does not exist
|
||||
// MustInt16s requires parameter value to exist to bind to int16 slice variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustInt16s(sourceParam string, dest *[]int16) *ValueBinder {
|
||||
return b.intsValue(sourceParam, dest, true)
|
||||
}
|
||||
@ -651,7 +651,7 @@ func (b *ValueBinder) Int8s(sourceParam string, dest *[]int8) *ValueBinder {
|
||||
return b.intsValue(sourceParam, dest, false)
|
||||
}
|
||||
|
||||
// MustInt8s requires parameter value to exist to be bind to int8 slice variable. Returns error when value does not exist
|
||||
// MustInt8s requires parameter value to exist to bind to int8 slice variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustInt8s(sourceParam string, dest *[]int8) *ValueBinder {
|
||||
return b.intsValue(sourceParam, dest, true)
|
||||
}
|
||||
@ -661,7 +661,7 @@ func (b *ValueBinder) Ints(sourceParam string, dest *[]int) *ValueBinder {
|
||||
return b.intsValue(sourceParam, dest, false)
|
||||
}
|
||||
|
||||
// MustInts requires parameter value to exist to be bind to int slice variable. Returns error when value does not exist
|
||||
// MustInts requires parameter value to exist to bind to int slice variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustInts(sourceParam string, dest *[]int) *ValueBinder {
|
||||
return b.intsValue(sourceParam, dest, true)
|
||||
}
|
||||
@ -671,7 +671,7 @@ func (b *ValueBinder) Uint64(sourceParam string, dest *uint64) *ValueBinder {
|
||||
return b.uintValue(sourceParam, dest, 64, false)
|
||||
}
|
||||
|
||||
// MustUint64 requires parameter value to exist to be bind to uint64 variable. Returns error when value does not exist
|
||||
// MustUint64 requires parameter value to exist to bind to uint64 variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustUint64(sourceParam string, dest *uint64) *ValueBinder {
|
||||
return b.uintValue(sourceParam, dest, 64, true)
|
||||
}
|
||||
@ -681,7 +681,7 @@ func (b *ValueBinder) Uint32(sourceParam string, dest *uint32) *ValueBinder {
|
||||
return b.uintValue(sourceParam, dest, 32, false)
|
||||
}
|
||||
|
||||
// MustUint32 requires parameter value to exist to be bind to uint32 variable. Returns error when value does not exist
|
||||
// MustUint32 requires parameter value to exist to bind to uint32 variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustUint32(sourceParam string, dest *uint32) *ValueBinder {
|
||||
return b.uintValue(sourceParam, dest, 32, true)
|
||||
}
|
||||
@ -691,7 +691,7 @@ func (b *ValueBinder) Uint16(sourceParam string, dest *uint16) *ValueBinder {
|
||||
return b.uintValue(sourceParam, dest, 16, false)
|
||||
}
|
||||
|
||||
// MustUint16 requires parameter value to exist to be bind to uint16 variable. Returns error when value does not exist
|
||||
// MustUint16 requires parameter value to exist to bind to uint16 variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustUint16(sourceParam string, dest *uint16) *ValueBinder {
|
||||
return b.uintValue(sourceParam, dest, 16, true)
|
||||
}
|
||||
@ -701,7 +701,7 @@ func (b *ValueBinder) Uint8(sourceParam string, dest *uint8) *ValueBinder {
|
||||
return b.uintValue(sourceParam, dest, 8, false)
|
||||
}
|
||||
|
||||
// MustUint8 requires parameter value to exist to be bind to uint8 variable. Returns error when value does not exist
|
||||
// MustUint8 requires parameter value to exist to bind to uint8 variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustUint8(sourceParam string, dest *uint8) *ValueBinder {
|
||||
return b.uintValue(sourceParam, dest, 8, true)
|
||||
}
|
||||
@ -711,7 +711,7 @@ func (b *ValueBinder) Byte(sourceParam string, dest *byte) *ValueBinder {
|
||||
return b.uintValue(sourceParam, dest, 8, false)
|
||||
}
|
||||
|
||||
// MustByte requires parameter value to exist to be bind to byte variable. Returns error when value does not exist
|
||||
// MustByte requires parameter value to exist to bind to byte variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustByte(sourceParam string, dest *byte) *ValueBinder {
|
||||
return b.uintValue(sourceParam, dest, 8, true)
|
||||
}
|
||||
@ -721,7 +721,7 @@ func (b *ValueBinder) Uint(sourceParam string, dest *uint) *ValueBinder {
|
||||
return b.uintValue(sourceParam, dest, 0, false)
|
||||
}
|
||||
|
||||
// MustUint requires parameter value to exist to be bind to uint variable. Returns error when value does not exist
|
||||
// MustUint requires parameter value to exist to bind to uint variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustUint(sourceParam string, dest *uint) *ValueBinder {
|
||||
return b.uintValue(sourceParam, dest, 0, true)
|
||||
}
|
||||
@ -849,7 +849,7 @@ func (b *ValueBinder) Uint64s(sourceParam string, dest *[]uint64) *ValueBinder {
|
||||
return b.uintsValue(sourceParam, dest, false)
|
||||
}
|
||||
|
||||
// MustUint64s requires parameter value to exist to be bind to uint64 slice variable. Returns error when value does not exist
|
||||
// MustUint64s requires parameter value to exist to bind to uint64 slice variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustUint64s(sourceParam string, dest *[]uint64) *ValueBinder {
|
||||
return b.uintsValue(sourceParam, dest, true)
|
||||
}
|
||||
@ -859,7 +859,7 @@ func (b *ValueBinder) Uint32s(sourceParam string, dest *[]uint32) *ValueBinder {
|
||||
return b.uintsValue(sourceParam, dest, false)
|
||||
}
|
||||
|
||||
// MustUint32s requires parameter value to exist to be bind to uint32 slice variable. Returns error when value does not exist
|
||||
// MustUint32s requires parameter value to exist to bind to uint32 slice variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustUint32s(sourceParam string, dest *[]uint32) *ValueBinder {
|
||||
return b.uintsValue(sourceParam, dest, true)
|
||||
}
|
||||
@ -869,7 +869,7 @@ func (b *ValueBinder) Uint16s(sourceParam string, dest *[]uint16) *ValueBinder {
|
||||
return b.uintsValue(sourceParam, dest, false)
|
||||
}
|
||||
|
||||
// MustUint16s requires parameter value to exist to be bind to uint16 slice variable. Returns error when value does not exist
|
||||
// MustUint16s requires parameter value to exist to bind to uint16 slice variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustUint16s(sourceParam string, dest *[]uint16) *ValueBinder {
|
||||
return b.uintsValue(sourceParam, dest, true)
|
||||
}
|
||||
@ -879,7 +879,7 @@ func (b *ValueBinder) Uint8s(sourceParam string, dest *[]uint8) *ValueBinder {
|
||||
return b.uintsValue(sourceParam, dest, false)
|
||||
}
|
||||
|
||||
// MustUint8s requires parameter value to exist to be bind to uint8 slice variable. Returns error when value does not exist
|
||||
// MustUint8s requires parameter value to exist to bind to uint8 slice variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustUint8s(sourceParam string, dest *[]uint8) *ValueBinder {
|
||||
return b.uintsValue(sourceParam, dest, true)
|
||||
}
|
||||
@ -889,7 +889,7 @@ func (b *ValueBinder) Uints(sourceParam string, dest *[]uint) *ValueBinder {
|
||||
return b.uintsValue(sourceParam, dest, false)
|
||||
}
|
||||
|
||||
// MustUints requires parameter value to exist to be bind to uint slice variable. Returns error when value does not exist
|
||||
// MustUints requires parameter value to exist to bind to uint slice variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustUints(sourceParam string, dest *[]uint) *ValueBinder {
|
||||
return b.uintsValue(sourceParam, dest, true)
|
||||
}
|
||||
@ -899,7 +899,7 @@ func (b *ValueBinder) Bool(sourceParam string, dest *bool) *ValueBinder {
|
||||
return b.boolValue(sourceParam, dest, false)
|
||||
}
|
||||
|
||||
// MustBool requires parameter value to exist to be bind to bool variable. Returns error when value does not exist
|
||||
// MustBool requires parameter value to exist to bind to bool variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustBool(sourceParam string, dest *bool) *ValueBinder {
|
||||
return b.boolValue(sourceParam, dest, true)
|
||||
}
|
||||
@ -964,7 +964,7 @@ func (b *ValueBinder) Bools(sourceParam string, dest *[]bool) *ValueBinder {
|
||||
return b.boolsValue(sourceParam, dest, false)
|
||||
}
|
||||
|
||||
// MustBools requires parameter values to exist to be bind to slice of bool variables. Returns error when values does not exist
|
||||
// MustBools requires parameter values to exist to bind to slice of bool variables. Returns error when values does not exist
|
||||
func (b *ValueBinder) MustBools(sourceParam string, dest *[]bool) *ValueBinder {
|
||||
return b.boolsValue(sourceParam, dest, true)
|
||||
}
|
||||
@ -974,7 +974,7 @@ func (b *ValueBinder) Float64(sourceParam string, dest *float64) *ValueBinder {
|
||||
return b.floatValue(sourceParam, dest, 64, false)
|
||||
}
|
||||
|
||||
// MustFloat64 requires parameter value to exist to be bind to float64 variable. Returns error when value does not exist
|
||||
// MustFloat64 requires parameter value to exist to bind to float64 variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustFloat64(sourceParam string, dest *float64) *ValueBinder {
|
||||
return b.floatValue(sourceParam, dest, 64, true)
|
||||
}
|
||||
@ -984,7 +984,7 @@ func (b *ValueBinder) Float32(sourceParam string, dest *float32) *ValueBinder {
|
||||
return b.floatValue(sourceParam, dest, 32, false)
|
||||
}
|
||||
|
||||
// MustFloat32 requires parameter value to exist to be bind to float32 variable. Returns error when value does not exist
|
||||
// MustFloat32 requires parameter value to exist to bind to float32 variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustFloat32(sourceParam string, dest *float32) *ValueBinder {
|
||||
return b.floatValue(sourceParam, dest, 32, true)
|
||||
}
|
||||
@ -1069,7 +1069,7 @@ func (b *ValueBinder) Float64s(sourceParam string, dest *[]float64) *ValueBinder
|
||||
return b.floatsValue(sourceParam, dest, false)
|
||||
}
|
||||
|
||||
// MustFloat64s requires parameter values to exist to be bind to slice of float64 variables. Returns error when values does not exist
|
||||
// MustFloat64s requires parameter values to exist to bind to slice of float64 variables. Returns error when values does not exist
|
||||
func (b *ValueBinder) MustFloat64s(sourceParam string, dest *[]float64) *ValueBinder {
|
||||
return b.floatsValue(sourceParam, dest, true)
|
||||
}
|
||||
@ -1079,7 +1079,7 @@ func (b *ValueBinder) Float32s(sourceParam string, dest *[]float32) *ValueBinder
|
||||
return b.floatsValue(sourceParam, dest, false)
|
||||
}
|
||||
|
||||
// MustFloat32s requires parameter values to exist to be bind to slice of float32 variables. Returns error when values does not exist
|
||||
// MustFloat32s requires parameter values to exist to bind to slice of float32 variables. Returns error when values does not exist
|
||||
func (b *ValueBinder) MustFloat32s(sourceParam string, dest *[]float32) *ValueBinder {
|
||||
return b.floatsValue(sourceParam, dest, true)
|
||||
}
|
||||
@ -1089,7 +1089,7 @@ func (b *ValueBinder) Time(sourceParam string, dest *time.Time, layout string) *
|
||||
return b.time(sourceParam, dest, layout, false)
|
||||
}
|
||||
|
||||
// MustTime requires parameter value to exist to be bind to time.Time variable. Returns error when value does not exist
|
||||
// MustTime requires parameter value to exist to bind to time.Time variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustTime(sourceParam string, dest *time.Time, layout string) *ValueBinder {
|
||||
return b.time(sourceParam, dest, layout, true)
|
||||
}
|
||||
@ -1120,7 +1120,7 @@ func (b *ValueBinder) Times(sourceParam string, dest *[]time.Time, layout string
|
||||
return b.times(sourceParam, dest, layout, false)
|
||||
}
|
||||
|
||||
// MustTimes requires parameter values to exist to be bind to slice of time.Time variables. Returns error when values does not exist
|
||||
// MustTimes requires parameter values to exist to bind to slice of time.Time variables. Returns error when values does not exist
|
||||
func (b *ValueBinder) MustTimes(sourceParam string, dest *[]time.Time, layout string) *ValueBinder {
|
||||
return b.times(sourceParam, dest, layout, true)
|
||||
}
|
||||
@ -1161,7 +1161,7 @@ func (b *ValueBinder) Duration(sourceParam string, dest *time.Duration) *ValueBi
|
||||
return b.duration(sourceParam, dest, false)
|
||||
}
|
||||
|
||||
// MustDuration requires parameter value to exist to be bind to time.Duration variable. Returns error when value does not exist
|
||||
// MustDuration requires parameter value to exist to bind to time.Duration variable. Returns error when value does not exist
|
||||
func (b *ValueBinder) MustDuration(sourceParam string, dest *time.Duration) *ValueBinder {
|
||||
return b.duration(sourceParam, dest, true)
|
||||
}
|
||||
@ -1192,7 +1192,7 @@ func (b *ValueBinder) Durations(sourceParam string, dest *[]time.Duration) *Valu
|
||||
return b.durationsValue(sourceParam, dest, false)
|
||||
}
|
||||
|
||||
// MustDurations requires parameter values to exist to be bind to slice of time.Duration variables. Returns error when values does not exist
|
||||
// MustDurations requires parameter values to exist to bind to slice of time.Duration variables. Returns error when values does not exist
|
||||
func (b *ValueBinder) MustDurations(sourceParam string, dest *[]time.Duration) *ValueBinder {
|
||||
return b.durationsValue(sourceParam, dest, true)
|
||||
}
|
||||
@ -1241,7 +1241,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 be bind to time.Duration variable (in local Time corresponding
|
||||
// MustUnixTime requires parameter value to exist to bind to time.Duration 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
|
||||
@ -1252,7 +1252,7 @@ func (b *ValueBinder) MustUnixTime(sourceParam string, dest *time.Time) *ValueBi
|
||||
return b.unixTime(sourceParam, dest, true, time.Second)
|
||||
}
|
||||
|
||||
// UnixTimeMilli binds parameter to time.Time variable (in local Time corresponding to the given Unix time in millisecond precision).
|
||||
// UnixTimeMilli binds parameter to time.Time variable (in local time corresponding to the given Unix time in millisecond precision).
|
||||
//
|
||||
// Example: 1647184410140 bind to 2022-03-13T15:13:30.140000000+00:00
|
||||
//
|
||||
@ -1262,7 +1262,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 be bind to time.Duration variable (in local Time corresponding
|
||||
// MustUnixTimeMilli requires parameter value to exist to bind to time.Duration 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
|
||||
@ -1273,7 +1273,7 @@ func (b *ValueBinder) MustUnixTimeMilli(sourceParam string, dest *time.Time) *Va
|
||||
return b.unixTime(sourceParam, dest, true, time.Millisecond)
|
||||
}
|
||||
|
||||
// UnixTimeNano binds parameter to time.Time variable (in local Time corresponding to the given Unix time in nanosecond precision).
|
||||
// UnixTimeNano binds parameter to time.Time variable (in local time corresponding to the given Unix time in nanosecond precision).
|
||||
//
|
||||
// Example: 1609180603123456789 binds to 2020-12-28T18:36:43.123456789+00:00
|
||||
// Example: 1000000000 binds to 1970-01-01T00:00:01.000000000+00:00
|
||||
@ -1286,7 +1286,7 @@ 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 be bind to time.Duration variable (in local Time corresponding
|
||||
// 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.
|
||||
//
|
||||
// Example: 1609180603123456789 binds to 2020-12-28T18:36:43.123456789+00:00
|
||||
|
Loading…
Reference in New Issue
Block a user