Skip to content

Commit df4adff

Browse files
committed
Fix lint issues
1 parent 26e826e commit df4adff

4 files changed

Lines changed: 107 additions & 104 deletions

File tree

numerics.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func IsNonPositive(value float64) bool {
4141
return value <= 0
4242
}
4343

44-
// InRange returns true if value lies between left and right border
44+
// InRangeInt returns true if value lies between left and right border
4545
func InRangeInt(value, left, right interface{}) bool {
4646
value64, _ := ToInt(value)
4747
left64, _ := ToInt(left)
@@ -52,15 +52,15 @@ func InRangeInt(value, left, right interface{}) bool {
5252
return value64 >= left64 && value64 <= right64
5353
}
5454

55-
// InRange returns true if value lies between left and right border
55+
// InRangeFloat32 returns true if value lies between left and right border
5656
func InRangeFloat32(value, left, right float32) bool {
5757
if left > right {
5858
left, right = right, left
5959
}
6060
return value >= left && value <= right
6161
}
6262

63-
// InRange returns true if value lies between left and right border
63+
// InRangeFloat64 returns true if value lies between left and right border
6464
func InRangeFloat64(value, left, right float64) bool {
6565
if left > right {
6666
left, right = right, left

types.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@ type Validator func(str string) bool
1414
// The second parameter should be the context (in the case of validating a struct: the whole object being validated).
1515
type CustomTypeValidator func(i interface{}, o interface{}) bool
1616

17-
// ParamValidator is a wrapper for validator functions that accepts additional parameters.
17+
// ParamValidator is a wrapper for validator functions that accept additional parameters.
1818
type ParamValidator func(str string, params ...string) bool
19+
20+
// InterfaceParamValidator is a wrapper for functions that accept variants parameters for an interface value
1921
type InterfaceParamValidator func(in interface{}, params ...string) bool
2022
type tagOptionsMap map[string]tagOption
2123

0 commit comments

Comments
 (0)