浏览代码

[fix] typo (#1655)

ronething-bot 3 年之前
父节点
当前提交
18916b5189
共有 1 个文件被更改,包括 5 次插入5 次删除
  1. 5 5
      tools/goctl/api/parser/g4/ast/type.go

+ 5 - 5
tools/goctl/api/parser/g4/ast/type.go

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