feat(Go-Tool):2020/12/14:添加validator.v8源码解析和使用示例

This commit is contained in:
Huangzj
2020-12-14 15:15:58 +08:00
parent 23d7d6e226
commit fa31b23cca
51 changed files with 4619 additions and 1662 deletions
+11 -11
View File
@@ -2,21 +2,21 @@ package linq
type comparer func(interface{}, interface{}) int
// Comparable is an interface that has to be implemented by a custom collection
// elememts in order to work with linq.
// Comparable is an interface that has to be implemented by a
// custom collection elememts in order to work with linq.
//
// Example:
// func (f foo) CompareTo(c Comparable) int {
// a, b := f.f1, c.(foo).f1
// func (f foo) CompareTo(c Comparable) int {
// a, b := f.f1, c.(foo).f1
//
// if a < b {
// return -1
// } else if a > b {
// return 1
// }
// if a < b {
// return -1
// } else if a > b {
// return 1
// }
//
// return 0
// }
// return 0
// }
type Comparable interface {
CompareTo(Comparable) int
}