feat(Go-Tool):

2020/12/16: 添加YAML和结构体转换工具
This commit is contained in:
Huangzj
2020-12-16 14:23:38 +08:00
parent 61966551cd
commit dc80b557e3
32 changed files with 1700 additions and 324 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
}