-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix several test output messages: Fatal to Fatalf. Added comments to …
…asc and desc package exported methods
- Loading branch information
Showing
8 changed files
with
78 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,61 @@ | ||
package asc | ||
|
||
// Uint8 is a less than comparison function for the Uint8 numeric type. | ||
func Uint8(i, j interface{}) bool { | ||
return i.(uint8) < j.(uint8) | ||
} | ||
|
||
// Uint16 is a less than comparison function for the Uint16 numeric type. | ||
func Uint16(i, j interface{}) bool { | ||
return i.(uint16) < j.(uint16) | ||
} | ||
|
||
// Uint32 is a less than comparison function for the Uint32 numeric type. | ||
func Uint32(i, j interface{}) bool { | ||
return i.(uint32) < j.(uint32) | ||
} | ||
|
||
// Uint64 is a less than comparison function for the Uint64 numeric type. | ||
func Uint64(i, j interface{}) bool { | ||
return i.(uint64) < j.(uint64) | ||
} | ||
|
||
// Int8 is a less than comparison function for the Int8 numeric type. | ||
func Int8(i, j interface{}) bool { | ||
return i.(int8) < j.(int8) | ||
} | ||
|
||
// Int16 is a less than comparison function for the Int16 numeric type. | ||
func Int16(i, j interface{}) bool { | ||
return i.(int16) < j.(int16) | ||
} | ||
|
||
// Int32 is a less than comparison function for the Int32 numeric type. | ||
func Int32(i, j interface{}) bool { | ||
return i.(int32) < j.(int32) | ||
} | ||
|
||
// Int64 is a less than comparison function for the Int64 numeric type. | ||
func Int64(i, j interface{}) bool { | ||
return i.(int64) < j.(int64) | ||
} | ||
|
||
// Float32 is a less than comparison function for the Float32 numeric type. | ||
func Float32(i, j interface{}) bool { | ||
return i.(float32) < j.(float32) | ||
} | ||
|
||
// Float64 is a less than comparison function for the Float64 numeric type. | ||
func Float64(i, j interface{}) bool { | ||
return i.(float64) < j.(float64) | ||
} | ||
|
||
// Uint is a less than comparison function for the Uint numeric type. | ||
func Uint(i, j interface{}) bool { | ||
return i.(uint) < j.(uint) | ||
} | ||
|
||
// Int is a less than comparison function for the Int numeric type. | ||
func Int(i, j interface{}) bool { | ||
return i.(int) < j.(int) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,61 @@ | ||
package desc | ||
|
||
// Uint8 is a greater than comparison function for the Uint8 numeric type. | ||
func Uint8(i, j interface{}) bool { | ||
return i.(uint8) > j.(uint8) | ||
} | ||
|
||
// Uint16 is a greater than comparison function for the Uint16 numeric type. | ||
func Uint16(i, j interface{}) bool { | ||
return i.(uint16) > j.(uint16) | ||
} | ||
|
||
// Uint32 is a greater than comparison function for the Uint32 numeric type. | ||
func Uint32(i, j interface{}) bool { | ||
return i.(uint32) > j.(uint32) | ||
} | ||
|
||
// Uint64 is a greater than comparison function for the Uint64 numeric type. | ||
func Uint64(i, j interface{}) bool { | ||
return i.(uint64) > j.(uint64) | ||
} | ||
|
||
// Int8 is a greater than comparison function for the Int8 numeric type. | ||
func Int8(i, j interface{}) bool { | ||
return i.(int8) > j.(int8) | ||
} | ||
|
||
// Int16 is a greater than comparison function for the Int16 numeric type. | ||
func Int16(i, j interface{}) bool { | ||
return i.(int16) > j.(int16) | ||
} | ||
|
||
// Int32 is a greater than comparison function for the Int32 numeric type. | ||
func Int32(i, j interface{}) bool { | ||
return i.(int32) > j.(int32) | ||
} | ||
|
||
// Int64 is a greater than comparison function for the Int64 numeric type. | ||
func Int64(i, j interface{}) bool { | ||
return i.(int64) > j.(int64) | ||
} | ||
|
||
// Float32 is a greater than comparison function for the Float32 numeric type. | ||
func Float32(i, j interface{}) bool { | ||
return i.(float32) > j.(float32) | ||
} | ||
|
||
// Float64 is a greater than comparison function for the Float64 numeric type. | ||
func Float64(i, j interface{}) bool { | ||
return i.(float64) > j.(float64) | ||
} | ||
|
||
// Uint is a greater than comparison function for the Uint numeric type. | ||
func Uint(i, j interface{}) bool { | ||
return i.(uint) > j.(uint) | ||
} | ||
|
||
// Int is a greater than comparison function for the Int numeric type. | ||
func Int(i, j interface{}) bool { | ||
return i.(int) > j.(int) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.