|
|
@ -648,19 +648,19 @@ func (s *TypeStruct) Equal(dt interface{}) bool {
|
|
|
|
return false
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var expected, acual []*TypeField
|
|
|
|
var expected, actual []*TypeField
|
|
|
|
expected = append(expected, s.Fields...)
|
|
|
|
expected = append(expected, s.Fields...)
|
|
|
|
acual = append(acual, v.Fields...)
|
|
|
|
actual = append(actual, v.Fields...)
|
|
|
|
|
|
|
|
|
|
|
|
sort.Slice(expected, func(i, j int) bool {
|
|
|
|
sort.Slice(expected, func(i, j int) bool {
|
|
|
|
return expected[i].DataType.Expr().Line() < expected[j].DataType.Expr().Line()
|
|
|
|
return expected[i].DataType.Expr().Line() < expected[j].DataType.Expr().Line()
|
|
|
|
})
|
|
|
|
})
|
|
|
|
sort.Slice(acual, func(i, j int) bool {
|
|
|
|
sort.Slice(actual, func(i, j int) bool {
|
|
|
|
return acual[i].DataType.Expr().Line() < acual[j].DataType.Expr().Line()
|
|
|
|
return actual[i].DataType.Expr().Line() < actual[j].DataType.Expr().Line()
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
for index, each := range expected {
|
|
|
|
for index, each := range expected {
|
|
|
|
ac := acual[index]
|
|
|
|
ac := actual[index]
|
|
|
|
if !each.Equal(ac) {
|
|
|
|
if !each.Equal(ac) {
|
|
|
|
return false
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
}
|
|
|
|